diff options
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp index db1592b1..5f24f150 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp @@ -178,8 +178,11 @@ public: ~QWinRTBluetoothDeviceDiscoveryWorker() { - if (leDeviceWatcher && leDeviceAddedToken.value) - leDeviceWatcher->remove_Added(leDeviceAddedToken); + if (leDeviceWatcher && leDeviceAddedToken.value) { + HRESULT hr; + hr = leDeviceWatcher->remove_Added(leDeviceAddedToken); + Q_ASSERT_SUCCEEDED(hr); + } } private: @@ -221,7 +224,9 @@ private: { qCDebug(QT_BT_WINRT) << (mode == BT ? "BT" : "BTLE") << "scan completed"; ComPtr<IVectorView<DeviceInformation *>> devices; - op->GetResults(&devices); + HRESULT hr; + hr = op->GetResults(&devices); + Q_ASSERT_SUCCEEDED(hr); onDevicesFound(devices.Get(), mode); initializedModes |= mode; if (initializedModes == BTAll) { |