diff --git a/plugins/dde-dock/sound/soundapplet.cpp b/plugins/dde-dock/sound/soundapplet.cpp index 5c7711cb2..6b9f57227 100644 --- a/plugins/dde-dock/sound/soundapplet.cpp +++ b/plugins/dde-dock/sound/soundapplet.cpp @@ -319,7 +319,7 @@ void SoundApplet::enableDevice(bool flag) void SoundApplet::removeDisabledDevice(QString portName, unsigned int cardId) { removePort(SoundCardPort::compositeKey(cardId, portName)); - if (m_defSinkInter->activePort().name == portName && m_defSinkInter->card() == cardId) { + if (m_defSinkInter && m_defSinkInter->activePort().name == portName && m_defSinkInter->card() == cardId) { enableDevice(false); } }