Don't crash when an engine failed to load

Prevents accessing an invalid KPluginInfo object, which is passed in
here for null engines.
This commit is contained in:
Sebastian Kügler 2013-04-10 01:50:31 +02:00
parent 63366d4218
commit 788870fffc

View File

@ -382,7 +382,11 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
{
updateTimestamp.start();
if (info.isValid()) {
e->setObjectName(info.name());
} else {
e->setObjectName("NullEngine");
}
if (dataEngineDescription.isValid()) {
QString api = dataEngineDescription.property("X-Plasma-API").toString();