From 4851be6e1e315a4d30c15dbc99397a3b7c0eda18 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 29 Apr 2014 18:20:52 +0200 Subject: [PATCH] don't crash if destroy happens before first sync --- src/scriptengines/qml/plasmoid/wallpaperinterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index bc2d749bf..4a3dd641a 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -58,7 +58,9 @@ WallpaperInterface::WallpaperInterface(ContainmentInterface *parent) WallpaperInterface::~WallpaperInterface() { - s_rootObjects.remove(m_qmlObject->engine()); + if (m_qmlObject) { + s_rootObjects.remove(m_qmlObject->engine()); + } } KPluginInfo::List WallpaperInterface::listWallpaperInfoForMimetype(const QString &mimetype, const QString &formFactor)