Commit e572ec1c authored by David Edmundson's avatar David Edmundson
Browse files

Fix crash if trying to load an invalid applet in systray

BUG: 352294
REVIEW: 125053
parent 5a0c7d36
......@@ -47,11 +47,18 @@ PlasmoidTask::PlasmoidTask(const QString &packageName, int appletId, Plasma::Con
: Task(parent),
m_taskId(packageName),
m_applet(0),
m_valid(true)
m_valid(false)
{
qCDebug(SYSTEMTRAY) << "Loading applet: " << packageName << appletId;
m_applet = Plasma::PluginLoader::self()->loadApplet(packageName, appletId);
if (!m_applet) {
qWarning() << "could not load plasma applet " << packageName << appletId;
return;
}
m_valid = true;
cont->setImmutability(Plasma::Types::Mutable);
cont->addApplet(m_applet);
m_applet->setParent(cont);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment