summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtconnectionmonitor.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/osx/osxbtconnectionmonitor.mm')
-rw-r--r--src/bluetooth/osx/osxbtconnectionmonitor.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtconnectionmonitor.mm b/src/bluetooth/osx/osxbtconnectionmonitor.mm
index f41bbed5..159bceb5 100644
--- a/src/bluetooth/osx/osxbtconnectionmonitor.mm
+++ b/src/bluetooth/osx/osxbtconnectionmonitor.mm
@@ -96,6 +96,15 @@ using namespace QT_NAMESPACE;
if (!device)
return;
+ if (!monitor) {
+ // Rather surprising: monitor == nullptr means we stopped monitoring.
+ // So apparently this thingie is still alive and keeps receiving
+ // notifications.
+ qCWarning(QT_BT_OSX,
+ "Connection notification received in a monitor that was cancelled");
+ return;
+ }
+
QT_BT_MAC_AUTORELEASEPOOL;
// All Obj-C objects are autoreleased.