don't crash if destroy happens before first sync

This commit is contained in:
Marco Martin 2014-04-29 18:20:52 +02:00
parent 97d6ba2dab
commit 4851be6e1e

View File

@ -58,7 +58,9 @@ WallpaperInterface::WallpaperInterface(ContainmentInterface *parent)
WallpaperInterface::~WallpaperInterface() 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) KPluginInfo::List WallpaperInterface::listWallpaperInfoForMimetype(const QString &mimetype, const QString &formFactor)