From 555a5ca61b9288108a6366552d4d263f1571104b Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 3 Apr 2013 13:03:37 +0200 Subject: [PATCH] If the menu item is merged then we should not release it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a menu item is merged then we do not want to release it as it will cause a problem with the Application menu. Therefore we just hide it instead. Change-Id: Ia9f7acfe063001111769841c9a360cac369f7ed7 Reviewed-by: James Turner Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoamenuitem.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 40cffab3c9..dd99a6f3bc 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -104,9 +104,9 @@ QCocoaMenuItem::~QCocoaMenuItem() { if (m_merged) { [m_native setHidden:YES]; + } else { + [m_native release]; } - - [m_native release]; } void QCocoaMenuItem::setText(const QString &text)