Fix a crash on loading of not existing engines.
r=aseigo (r/207/) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=778956
This commit is contained in:
parent
0fb0b0f613
commit
bc5accafd2
@ -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<Plasma::DataEngine>(0, allArgs, &error);
|
||||
|
Loading…
Reference in New Issue
Block a user