Blob Blame History Raw
From 4eee1f34793076d3f7ab4dccff87724806da6141 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sun, 12 Aug 2012 13:50:41 +0200
Subject: [PATCH 1/2] Do not delete the Part on the Shell destructor

The machinery in KParts/QObject is already doing it and this way we don't get the
KXMLGUIClient::~KXMLGUIClient: 0x15637528 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.
warning

I'm not sure if calling this a kdelibs bug yet or not though :D

BUGS: 261538
FIXED-IN: 4.9.1
---
 shell/shell.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell/shell.cpp b/shell/shell.cpp
index 8b42a27..df40f7d 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -120,7 +120,7 @@ void Shell::delayedOpen()
 Shell::~Shell()
 {
     if ( m_part ) writeSettings();
-    delete m_part;
+    m_part = 0; // It is deleted by the KPart/QObject machinery
     if ( m_args )
         m_args->clear();
 }
-- 
1.7.11.4