From 4c7f15548414193758602d7feb9171e2e2f68e86 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 15 Oct 2009 04:05:14 +0000 Subject: [PATCH] play tricks on the failed-to-be-a-containment applet to make dtors a bit safer BUG:208769 svn path=/trunk/KDE/kdelibs/; revision=1035450 --- corona.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/corona.cpp b/corona.cpp index 02c01c178..580920826 100644 --- a/corona.cpp +++ b/corona.cpp @@ -201,7 +201,14 @@ public: // in case we got a non-Containment from Applet::loadApplet or // a null containment was requested - delete applet; + if (applet) { + // the applet probably doesn't know what's hit it, so let's pretend it can be + // initialized to make assumptions in the applet's dtor safer + q->addItem(applet); + applet->init(); + q->removeItem(applet); + delete applet; + } containment = new Containment(0, 0, id); if (pluginName == "null") {