Guard against Applet not loading AppletInterface

Authored by davidedmundson on Apr 13 2017, 9:41 AM.

Description

Guard against Applet not loading AppletInterface

Summary:
This can happen if an applet has invalid metadata, it doesn't have a
script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
Having invalid metadata could come from the applet, or from the fallback applet
created in Containment::Private::createApplet.

We guard against it in appletAdded but not in appletRemoved, which is
inconsistent. We also apparently must have guards elsewhere otherwise
we'd see the crash more.

BUG: 377050

Test Plan: Had corrupt applet, used to crash, now doesn't

Reviewers: Plasma

Subscribers: plasma-devel, Frameworks

Tags: Plasma, Frameworks

Differential Revision: https://phabricator.kde.org/D5423

Details