From 79bb35d2ccf9b5532cc4af4c980b423c03a16b82 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Wed, 3 Feb 2016 10:37:01 +0100 Subject: [PATCH] Fix possible crash, mostly occurring on notification flood. --- src/qtui/snorenotificationbackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.20.1