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);