From c363b33b435659de4ad43ab8ac5ca29dbb0f7fed Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 5 Feb 2014 16:39:06 +0100 Subject: [PATCH] don't assume containment() exists --- src/scriptengines/qml/plasmoid/appletinterface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 1e7cbad6d..99a33c602 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -124,7 +124,11 @@ Plasma::Types::Location AppletInterface::location() const QString AppletInterface::currentActivity() const { - return applet()->containment()->activity(); + if (applet()->containment()) { + return applet()->containment()->activity(); + } else { + return QString(); + } } QObject* AppletInterface::configuration() const