guard against invalid applets

an applet can be present but being one that failed to load
therefore with an invalid kplugininfo, which can cause asserts around

BUG:364281
This commit is contained in:
Marco Martin 2016-06-15 12:44:04 +02:00
parent 6f5816fc57
commit 746f57713c

View File

@ -85,6 +85,10 @@ void ConfigViewPrivate::init()
qWarning() << "Null applet passed to constructor"; qWarning() << "Null applet passed to constructor";
return; return;
} }
if (!applet.data()->pluginInfo().isValid()) {
qWarning() << "Invalid applet passed to constructor";
return;
}
applet.data()->setUserConfiguring(true); applet.data()->setUserConfiguring(true);