From e328846969eeeeac5cc7ed487025ef318272ed84 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 6 Jul 2011 11:02:38 +0000 Subject: [PATCH] allow NULL parent menu git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/menuitem.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index 715517244a..543b64f321 100644 --- a/src/osx/cocoa/menuitem.mm +++ b/src/osx/cocoa/menuitem.mm @@ -328,7 +328,7 @@ wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu, wxCFStringRef cfText(text); SEL selector = nil; bool targetSelf = false; - if ( ! pParentMenu->GetNoEventsMode() && pSubMenu == NULL ) + if ( (pParentMenu == NULL || !pParentMenu->GetNoEventsMode()) && pSubMenu == NULL ) { selector = wxOSXGetSelectorFromID(menuid);