From 8a05294e5b3ef1df86f099edde837b8c8d28ccaf Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 12 Jul 2017 18:06:28 +0200 Subject: [PATCH] [Notifications] Check for corona to avoid crash My previous attempt only fixed the case when notifications were directly in a panel. Now it also no longer crashes when removing a panel that has a System Tray with the notifications applet in it. BUG: 378508 FIXED-IN: 5.8.8 Differential Revision: https://phabricator.kde.org/D6653 --- applets/notifications/lib/notificationsapplet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/notifications/lib/notificationsapplet.cpp b/applets/notifications/lib/notificationsapplet.cpp index 4474c8c82..f49071c7a 100644 --- a/applets/notifications/lib/notificationsapplet.cpp +++ b/applets/notifications/lib/notificationsapplet.cpp @@ -63,7 +63,7 @@ void NotificationsApplet::onScreenChanges() { // when removing the panel the applet is in, the containment is being destroyed but its corona is still // there, rightfully emitting availableScreenRectChanged and then we blow up if we try to access it. - if (!containment()) { + if (!containment() || !containment()->corona()) { return; }