mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-05-31 22:42:33 +00:00
fix: 修复反复开关蓝牙导致的崩溃问题
野指针问题 Log: 修复反复开关蓝牙导致的崩溃问题 Influence: 蓝牙开关功能 Task: https://pms.uniontech.com/task-view-226123.html Change-Id: Id6c495ffa24aebbb15ad0bac8cdc5ed9aeef8f54
This commit is contained in:
parent
460705c401
commit
949c9eb9af
@ -274,7 +274,7 @@ void BluetoothAdapterItem::onDeviceAdded(const Device *device)
|
|||||||
|
|
||||||
void BluetoothAdapterItem::onDeviceRemoved(const Device *device)
|
void BluetoothAdapterItem::onDeviceRemoved(const Device *device)
|
||||||
{
|
{
|
||||||
if (m_deviceItems.isEmpty())
|
if (m_deviceItems.isEmpty() || !m_deviceItems.keys().contains(device->id()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_deviceModel->removeRow(m_deviceItems.value(device->id())->standardItem()->row());
|
m_deviceModel->removeRow(m_deviceItems.value(device->id())->standardItem()->row());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user