diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2019-04-09 15:57:23 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2019-04-12 12:12:16 +0000 |
commit | 72f3ad1dbe66ad4700417e6f681f92320e2fd183 (patch) | |
tree | 84f5b944d7e959c9713b2bcf89888a1f89717f69 | |
parent | 04fc614b5650f39331ed672c9f11f57c1df0836c (diff) |
Don't create QBluetoothServiceInfo when uuid is null
Sometimes Android returns a null uuid as SDP result. There is no point
processing them further.
Change-Id: I07b52e79a31becda72452e3446aca9ea4933968b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_android.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp index 5e6ddadb..3ab0d580 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp @@ -390,9 +390,12 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB }; for (int i = 0; i < uuids.count(); i++) { + const QBluetoothUuid &uuid = uuids.at(i); + if (uuid.isNull()) + continue; + QBluetoothServiceInfo serviceInfo; serviceInfo.setDevice(remoteDevice); - const QBluetoothUuid &uuid = uuids.at(i); QBluetoothServiceInfo::Sequence protocolDescriptorList; { |