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

wilder-5.14
Sebastian Kügler 13 years ago
parent e3bbd309ae
commit 65cfa38628
  1. 5
      widgetexplorer/widgetexplorer.cpp

@ -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) {

Loading…
Cancel
Save