Don't crash when an applet can't be loaded from disk

This commit is contained in:
Sebastian Kügler 2013-08-14 05:47:38 +02:00
parent 2256c5ad1c
commit b14d63b367

View File

@ -460,7 +460,10 @@ void WidgetExplorer::addApplet(const QString &pluginName)
QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, p, QStandardPaths::LocateDirectory);
qDebug() << " .. pathes: " << dirs;
if (!dirs.count()) {
qWarning() << "Failed to find plasmoid path for " << pluginName;
return;
}
Plasma::Applet *applet = Plasma::Applet::loadPlasmoid(dirs.first());
if (applet) {