diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 7cec792ce..aef501d3f 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -91,6 +91,9 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent, cons connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, [=]() { + if (!containment()) { + return; + } disconnect(containment(), &Plasma::Containment::appletRemoved, this, &ContainmentInterface::appletRemovedForward); });