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:
parent
63366d4218
commit
788870fffc
@ -382,7 +382,11 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
|
||||
{
|
||||
updateTimestamp.start();
|
||||
|
||||
e->setObjectName(info.name());
|
||||
if (info.isValid()) {
|
||||
e->setObjectName(info.name());
|
||||
} else {
|
||||
e->setObjectName("NullEngine");
|
||||
}
|
||||
|
||||
if (dataEngineDescription.isValid()) {
|
||||
QString api = dataEngineDescription.property("X-Plasma-API").toString();
|
||||
|
Loading…
Reference in New Issue
Block a user