diff options
Diffstat (limited to 'src/bluetooth/darwin/btconnectionmonitor.mm')
-rw-r--r-- | src/bluetooth/darwin/btconnectionmonitor.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/darwin/btconnectionmonitor.mm b/src/bluetooth/darwin/btconnectionmonitor.mm index 548fec9c..a9f038f5 100644 --- a/src/bluetooth/darwin/btconnectionmonitor.mm +++ b/src/bluetooth/darwin/btconnectionmonitor.mm @@ -89,6 +89,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_DARWIN, + "Connection notification received in a monitor that was cancelled"); + return; + } + QT_BT_MAC_AUTORELEASEPOOL; // All Obj-C objects are autoreleased. |