diff --git a/src/shell/view.cpp b/src/shell/view.cpp index a0c61686c..6262e7b81 100644 --- a/src/shell/view.cpp +++ b/src/shell/view.cpp @@ -100,17 +100,17 @@ void View::setContainment(Plasma::Containment *cont) emit containmentChanged(); - if (cont) { - connect(cont, &Plasma::Containment::locationChanged, - this, &View::locationChanged); - connect(cont, &Plasma::Containment::formFactorChanged, - this, &View::formFactorChanged); - connect(cont, &Plasma::Containment::configureRequested, - this, &View::showConfigurationInterface); - } else { + if (!cont) { return; } + connect(cont, &Plasma::Containment::locationChanged, + this, &View::locationChanged); + connect(cont, &Plasma::Containment::formFactorChanged, + this, &View::formFactorChanged); + connect(cont, &Plasma::Containment::configureRequested, + this, &View::showConfigurationInterface); + QObject *graphicObject = m_containment.data()->property("graphicObject").value(); if (graphicObject) {