winrt: Do not try to delete nullptr worker

When calling QBluetoothDeviceDiscoveryAgentPrivate::stop the worker
pointer is cleared in disconnectAndClearWorker so there is no need
to call deleteLater (which will just result in a warning).

Change-Id: I2713474833b61a12018ecfa6f9eb11618ed025a7
Task-number: QTBUG-75089
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
Oliver Wolff 2019-07-16 13:03:01 +02:00
parent 8a6d9c3078
commit 4ac755bb6e
1 changed files with 1 additions and 3 deletions

View File

@ -606,10 +606,8 @@ void QBluetoothDeviceDiscoveryAgentPrivate::stop()
disconnectAndClearWorker();
emit q->canceled();
}
if (leScanTimer) {
if (leScanTimer)
leScanTimer->stop();
worker->deleteLater();
}
}
void QBluetoothDeviceDiscoveryAgentPrivate::registerDevice(const QBluetoothDeviceInfo &info)