summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
index 75efa37d..412fd916 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
@@ -272,7 +272,9 @@ void QBluetoothServiceDiscoveryAgentPrivate::_q_finishSdpScan(QBluetoothServiceD
if (errorCode != QBluetoothServiceDiscoveryAgent::NoError) {
qCWarning(QT_BT_BLUEZ) << "SDP search failed for"
- << discoveredDevices.at(0).address().toString();
+ << (!discoveredDevices.isEmpty()
+ ? discoveredDevices.at(0).address().toString()
+ : QStringLiteral("<Unknown>"));
// We have an error which we need to indicate and stop further processing
discoveredDevices.clear();
error = errorCode;