mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix :多次向右旋转屏幕导致任务栏消失
多次旋转屏幕后,声音信息发生改变,触发了对野指针的判断 Log: 修复多次向右旋转屏幕导致任务栏消失问题 Bug: https://pms.uniontech.com/zentao/bug-view-51625.html Change-Id: Ie2c7c43255412b86e63a16bc487d2edb2d09d153
This commit is contained in:
parent
35df09ee53
commit
52b13f8b19
@ -263,7 +263,7 @@ void SoundApplet::defaultSinkChanged()
|
||||
QString portId = m_defSinkInter->activePort().name;
|
||||
uint cardId = m_defSinkInter->card();
|
||||
//最后一个设备会被移除,但是当在控制中心选中此设备后需要添加,并勾选
|
||||
if (m_lastPort && m_lastPort->cardId() == cardId && m_lastPort->id() == portId) {
|
||||
if (!m_lastPort.isNull() && m_lastPort->cardId() == cardId && m_lastPort->id() == portId) {
|
||||
startAddPort(m_lastPort);
|
||||
}
|
||||
activePort(portId,cardId);
|
||||
|
@ -153,7 +153,7 @@ private:
|
||||
QStandardItemModel *m_model;
|
||||
QList<Port *> m_ports;
|
||||
QString m_deviceInfo;
|
||||
Port *m_lastPort;//最后一个因为只有一个设备而被直接移除的设备
|
||||
QPointer<Port> m_lastPort;//最后一个因为只有一个设备而被直接移除的设备
|
||||
};
|
||||
|
||||
#endif // SOUNDAPPLET_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user