diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-02-26 13:58:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-26 16:18:01 +0100 |
commit | 3ea69e89d43911f68203fcb40fee80a6bcd04ed5 (patch) | |
tree | d55bfebff7cbd986b7473534424921397b45b8d3 | |
parent | 5e1c579d620655bb32019eaabe3297e780cefe13 (diff) |
Fix crash when calling QBluetoothLocalDevice::connectedDevices()
The crash happened on Bluez while no local Bt device is connected.
Change-Id: I418f73b964edc3c302665d4e3374b49a68cfdc46
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_bluez.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp index 310be91b..9f2e7fd3 100644 --- a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp +++ b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp @@ -503,6 +503,9 @@ void QBluetoothLocalDevicePrivate::_q_devicePropertyChanged(const QString &prope void QBluetoothLocalDevicePrivate::createCache() { + if (!adapter) + return; + QDBusPendingReply<QList<QDBusObjectPath> > reply = adapter->ListDevices(); reply.waitForFinished(); if (reply.isError()) { |