diff --git a/src/plasmaquick/appletquickitem.cpp b/src/plasmaquick/appletquickitem.cpp index 45055a5f8..6ec12b918 100644 --- a/src/plasmaquick/appletquickitem.cpp +++ b/src/plasmaquick/appletquickitem.cpp @@ -437,7 +437,7 @@ void AppletQuickItem::init() d->qmlObject->setSource(QUrl::fromLocalFile(d->applet->package().filePath("mainscript"))); - if (!engine || !engine->rootContext() || !engine->rootContext()->isValid() || d->qmlObject->mainComponent()->isError()) { + if (!engine || !engine->rootContext() || !engine->rootContext()->isValid() || !d->qmlObject->mainComponent() || d->qmlObject->mainComponent()->isError()) { QString reason; if (d->applet->package().isValid()) { foreach (QQmlError error, d->qmlObject->mainComponent()->errors()) {