diff --git a/src/blackgui/components/textmessagecomponent.cpp b/src/blackgui/components/textmessagecomponent.cpp index de0d032f3..74b14eb7b 100644 --- a/src/blackgui/components/textmessagecomponent.cpp +++ b/src/blackgui/components/textmessagecomponent.cpp @@ -430,7 +430,7 @@ namespace BlackGui textEdit->insertTextMessage(textMessage); // sound - if (!m_usedAsOverlayWidget && sGui && sGui->getIContextAudio()) + if (!m_usedAsOverlayWidget && sGui && !sGui->isShuttingDown() && sGui->getIContextAudio()) { sGui->getIContextAudio()->playNotification(CNotificationSounds::NotificationTextMessagePrivate, true); } diff --git a/src/blackgui/components/textmessagecomponent.h b/src/blackgui/components/textmessagecomponent.h index e5976efdc..6f5638307 100644 --- a/src/blackgui/components/textmessagecomponent.h +++ b/src/blackgui/components/textmessagecomponent.h @@ -106,7 +106,7 @@ namespace BlackGui QScopedPointer ui; BlackMisc::CIdentifier m_identifier { "TextMessageComponent", this }; BlackMisc::CSetting m_messageSettings { this, &CTextMessageComponent::onSettingsChanged }; - bool m_usedAsOverlayWidget = false; //!< disables dockwidget parts + bool m_usedAsOverlayWidget = false; //!< disables dockwidget parts if used as overlay widget //! Enum to widget QWidget *getTabWidget(TextMessageTab tab) const; diff --git a/src/swiftguistandard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp index a50941bf2..3dea0f6a2 100644 --- a/src/swiftguistandard/swiftguistd.cpp +++ b/src/swiftguistandard/swiftguistd.cpp @@ -447,6 +447,7 @@ void SwiftGuiStd::playNotifcationSound(CNotificationSounds::Notification notific { if (!m_contextAudioAvailable) { return; } if (!ui->comp_MainInfoArea->getSettingsComponent()->playNotificationSounds()) { return; } + if (!sGui || sGui->isShuttingDown()) { return; } sGui->getIContextAudio()->playNotification(notification, true); }