diff --git a/scriptengine.cpp b/scriptengine.cpp index bdd42f2af..14c1b6434 100644 --- a/scriptengine.cpp +++ b/scriptengine.cpp @@ -361,6 +361,10 @@ void ScriptEngine::setupEngine() bool ScriptEngine::isPanel(const Plasma::Containment *c) { + if (!c) { + return false; + } + return c->containmentType() == Plasma::Containment::PanelContainment || c->containmentType() == Plasma::Containment::CustomPanelContainment; }