summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/btscanner
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/btscanner')
-rw-r--r--examples/bluetooth/btscanner/device.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/bluetooth/btscanner/device.cpp b/examples/bluetooth/btscanner/device.cpp
index 910791fb..3d8a98dc 100644
--- a/examples/bluetooth/btscanner/device.cpp
+++ b/examples/bluetooth/btscanner/device.cpp
@@ -181,6 +181,8 @@ void DeviceDiscoveryDialog::hostModeStateChanged(QBluetoothLocalDevice::HostMode
}
void DeviceDiscoveryDialog::displayPairingMenu(const QPoint &pos)
{
+ if (ui->list->count() == 0)
+ return;
QMenu menu(this);
QAction *pairAction = menu.addAction("Pair");
QAction *removePairAction = menu.addAction("Remove Pairing");