[AppletInterface] Check for corona before accessing it
On plasmashell shutdown when the panels are destroyed, the available screen geometry changes. When an applet then accesses screenGeometry in response to that change, it crashes because the corona is already gone. availableScreenRegion() and availableScreenRect() already checked for this but screenGeometry() did not Differential Revision: https://phabricator.kde.org/D20244
This commit is contained in:
parent
9de0def99f
commit
c65145bd34
@ -574,7 +574,7 @@ int AppletInterface::screen() const
|
||||
|
||||
QRect AppletInterface::screenGeometry() const
|
||||
{
|
||||
if (!applet() || !applet()->containment()) {
|
||||
if (!applet() || !applet()->containment() || !applet()->containment()->corona()) {
|
||||
return QRect();
|
||||
}
|
||||
return applet()->containment()->corona()->screenGeometry(applet()->containment()->screen());
|
||||
|
Loading…
x
Reference in New Issue
Block a user