crash--
applet may be invalid Change-Id: I53e831f1fb2dcf991b9248ce79036d77208d5893
This commit is contained in:
parent
45a2f5a828
commit
c8fdd7ed20
@ -233,6 +233,10 @@ Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const
|
|||||||
|
|
||||||
if (applet) {
|
if (applet) {
|
||||||
QQuickItem *appletGraphicObject = applet->property("_plasma_graphicObject").value<QQuickItem *>();
|
QQuickItem *appletGraphicObject = applet->property("_plasma_graphicObject").value<QQuickItem *>();
|
||||||
|
//invalid applet?
|
||||||
|
if (!appletGraphicObject) {
|
||||||
|
return applet;
|
||||||
|
}
|
||||||
if (geom.width() > 0 && geom.height() > 0) {
|
if (geom.width() > 0 && geom.height() > 0) {
|
||||||
appletGraphicObject->setWidth(geom.width());
|
appletGraphicObject->setWidth(geom.width());
|
||||||
appletGraphicObject->setHeight(geom.height());
|
appletGraphicObject->setHeight(geom.height());
|
||||||
|
Loading…
Reference in New Issue
Block a user