diff --git a/plugins/bluetooth/componments/bluetoothadapteritem.cpp b/plugins/bluetooth/componments/bluetoothadapteritem.cpp index 697d5c21e..4b3f7584e 100644 --- a/plugins/bluetooth/componments/bluetoothadapteritem.cpp +++ b/plugins/bluetooth/componments/bluetoothadapteritem.cpp @@ -274,7 +274,7 @@ void BluetoothAdapterItem::onDeviceAdded(const Device *device) void BluetoothAdapterItem::onDeviceRemoved(const Device *device) { - if (m_deviceItems.isEmpty()) + if (m_deviceItems.isEmpty() || !m_deviceItems.keys().contains(device->id())) return; m_deviceModel->removeRow(m_deviceItems.value(device->id())->standardItem()->row());