From: Hannah von Reth Date: Wed, 3 Feb 2016 09:37:01 +0000 (+0100) Subject: Fix possible crash, mostly occurring on notification flood. X-Git-Tag: 0.12.3~9 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=79bb35d2ccf9b5532cc4af4c980b423c03a16b82 Fix possible crash, mostly occurring on notification flood. --- diff --git a/src/qtui/snorenotificationbackend.cpp b/src/qtui/snorenotificationbackend.cpp index 69ce0e0a..6c125d98 100644 --- a/src/qtui/snorenotificationbackend.cpp +++ b/src/qtui/snorenotificationbackend.cpp @@ -91,7 +91,9 @@ void SnoreNotificationBackend::close(uint notificationId) } #endif Snore::Notification n = Snore::SnoreCore::instance().getActiveNotificationByID(m_notificationIds.take(notificationId)); - Snore::SnoreCore::instance().requestCloseNotification(n, Snore::Notification::Closed); + if (n.isValid()) { // Don't close the notification if it no longer exists. + Snore::SnoreCore::instance().requestCloseNotification(n, Snore::Notification::Closed); + } } void SnoreNotificationBackend::actionInvoked(Snore::Notification n)