applet may be invalid

Change-Id: I53e831f1fb2dcf991b9248ce79036d77208d5893
This commit is contained in:
Marco Martin 2016-08-09 11:40:28 +02:00
parent 45a2f5a828
commit c8fdd7ed20

View File

@ -233,6 +233,10 @@ Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const
if (applet) {
QQuickItem *appletGraphicObject = applet->property("_plasma_graphicObject").value<QQuickItem *>();
//invalid applet?
if (!appletGraphicObject) {
return applet;
}
if (geom.width() > 0 && geom.height() > 0) {
appletGraphicObject->setWidth(geom.width());
appletGraphicObject->setHeight(geom.height());