check pointer validity, crash--

even if that code path shouldn't be hit, always better avoiding a crash
(proper fix coming)
CCBUG:336491
This commit is contained in:
Marco Martin 2014-06-23 14:50:06 +02:00
parent 57001cfcf4
commit e09a2eb44a

View File

@ -462,6 +462,9 @@ int AppletInterface::screen() const
QRect AppletInterface::screenGeometry() const QRect AppletInterface::screenGeometry() const
{ {
if (!applet() || !applet()->containment()) {
return QRect();
}
return applet()->containment()->corona()->screenGeometry(applet()->containment()->screen()); return applet()->containment()->corona()->screenGeometry(applet()->containment()->screen());
} }