summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-03-17 09:46:05 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-03-17 09:46:05 +0100
commit27311cd3882eb0bb570d5b01663b8fb907fabfd5 (patch)
treeeccb967a446292197e541d8a001237bfede6c0d8 /src
parent6b2fd04b7be4494767b6092a030607010d91310c (diff)
parentfbb7acbc7f59fd79cbe6e59aef21be6d7c6cf5ca (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothsocket_android.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp
index 76cbccdb..31009ba2 100644
--- a/src/bluetooth/qbluetoothsocket_android.cpp
+++ b/src/bluetooth/qbluetoothsocket_android.cpp
@@ -137,7 +137,8 @@ bool QBluetoothSocketPrivate::fallBackConnect(QAndroidJniObject uuid, int channe
}
if (socketChannel
- == remoteDevice.getStaticField<jint>("android/bluetooth/BluetoothDevice", "ERROR")) {
+ == remoteDevice.getStaticField<jint>("android/bluetooth/BluetoothDevice", "ERROR")
+ || socketChannel == -1) {
qCWarning(QT_BT_ANDROID) << "Cannot determine RFCOMM service channel.";
} else {
qCWarning(QT_BT_ANDROID) << "Using found rfcomm channel" << socketChannel;