mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: 修复插入U盘后导致的崩溃问题
指针异常 Log: 修复插入U盘后导致的崩溃问题 Influence: 反复插拔u盘任务栏崩溃 Bug: https://pms.uniontech.com/bug-view-180075.html Bug: https://pms.uniontech.com/bug-view-180039.html Change-Id: I0a6ec7c0c29e782ab5f9a7beaad1288a49072376
This commit is contained in:
parent
87308cb76b
commit
af6c9d6185
@ -32,7 +32,7 @@ void SystemTraysController::itemAdded(PluginsItemInterface * const itemInter, co
|
||||
else {
|
||||
emit pluginItemRemoved(itemKey, item);
|
||||
}
|
||||
}, Qt::QueuedConnection);
|
||||
});
|
||||
|
||||
mPluginsMap[itemInter][itemKey] = item;
|
||||
|
||||
@ -69,7 +69,10 @@ void SystemTraysController::itemRemoved(PluginsItemInterface * const itemInter,
|
||||
item->centralWidget()->setParent(nullptr);
|
||||
|
||||
// just delete our wrapper object(PluginsItem)
|
||||
item->deleteLater();
|
||||
// 直接删除,item被用到的地方太多,且很多地方没判断是否为空,不应该用deleteLater
|
||||
// item->deleteLater();
|
||||
delete item;
|
||||
item = nullptr;
|
||||
}
|
||||
|
||||
void SystemTraysController::requestWindowAutoHide(PluginsItemInterface * const itemInter, const QString &itemKey, const bool autoHide)
|
||||
|
Loading…
x
Reference in New Issue
Block a user