[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
wilder-5.14
Kai Uwe Broulik 9 years ago
parent 774a23fc0a
commit 8a05294e5b
  1. 2
      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;
}

Loading…
Cancel
Save