From 35d1dd2d6557100ffd63aa801a7cb582f41c9fa1 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 16 May 2014 03:07:30 +0200 Subject: [PATCH] Don't try to delete null objects Fixes a warning in Qt and makes sense of what the code it's actually doing. At least it was not crashing! --- src/scriptengines/qml/plasmoid/wallpaperinterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index 4a3dd641a..f1da57143 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -133,8 +133,8 @@ void WallpaperInterface::syncWallpaperPackage() } m_pkg.setPath(m_wallpaperPlugin); - m_configLoader->deleteLater(); - m_configuration->deleteLater(); + if (m_configLoader) m_configLoader->deleteLater(); + if (m_configuration) m_configuration->deleteLater(); m_configLoader = 0; m_configuration = 0; if (configScheme()) {