From 34226faec13838e91d9d187555682434abd515df Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 17 Jun 2014 11:48:16 +0200 Subject: [PATCH] one occasion less to crash (on debug builds an assert is still possible) --- src/scriptengines/qml/plasmoid/containmentinterface.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); });