diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-09-29 10:22:03 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-08 09:57:51 +0000 |
commit | 59bc397f0ac0e0c333c415f25782f2a6614fc03a (patch) | |
tree | f7ede2410452e58d093a9719bdc8a01e4a671003 /src | |
parent | 869547fc4fb4b94e97c81989cf85da85d588328b (diff) |
Bluetooth device discovery agent (bluez): Prevent null pointer access.
We would potentially access a null adapter if stop() was called from a
user slot connected to the deviceDiscovered() signal.
Task-number: QTBUG-48481
Change-Id: I784120dcd7a9f71d9532fac9538ae98e1a329db2
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp index 4d296d20..dd81ae1f 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp @@ -247,6 +247,8 @@ void QBluetoothDeviceDiscoveryAgentPrivate::startBluez5() continue; //devices whose path doesn't start with same path we skip deviceFoundBluez5(path.path()); + if (!isActive()) // Can happen if stop() was called from a slot in user code. + return; } } } |