From bc5accafd2eb80674cbfb6c187b75ed0eb73bf0a Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 25 Feb 2008 01:19:07 +0000 Subject: [PATCH] Fix a crash on loading of not existing engines. r=aseigo (r/207/) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=778956 --- dataenginemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataenginemanager.cpp b/dataenginemanager.cpp index fd44bd0f8..e200d6e27 100644 --- a/dataenginemanager.cpp +++ b/dataenginemanager.cpp @@ -120,12 +120,12 @@ Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name) KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine", constraint); QString error; - QVariantList allArgs; - allArgs << offers.first()->storageId(); if (offers.isEmpty()) { kDebug() << "offers are empty for " << name << " with constraint " << constraint; } else { + QVariantList allArgs; + allArgs << offers.first()->storageId(); QString language = offers.first()->property("X-Plasma-Language").toString(); if (language.isEmpty()) { engine = offers.first()->createInstance(0, allArgs, &error);