Don't crash
Apparently, q->rootObject() can be invalid here.
This commit is contained in:
parent
1d28b028b1
commit
73e3c4a6ed
@ -111,7 +111,11 @@ void PlasmaQuickViewPrivate::setContainment(Plasma::Containment *cont)
|
||||
(cont->containmentType() == Plasma::Types::DesktopContainment ||
|
||||
cont->containmentType() == Plasma::Types::CustomContainment));
|
||||
graphicObject->setParentItem(q->rootObject());
|
||||
if (q->rootObject()) {
|
||||
q->rootObject()->setProperty("containment", QVariant::fromValue(graphicObject));
|
||||
} else {
|
||||
qWarning() << "Could not set containment property on rootObject";
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Containment graphic object not valid";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user