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)