diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 0f422843e0..49f3da48c2 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -110,6 +110,8 @@ QCocoaMenuItem::~QCocoaMenuItem() if (m_merged) { [m_native setHidden:YES]; } else { + if (m_menu && m_menu->attachedItem() == m_native) + m_menu->setAttachedItem(nil); [m_native release]; }