allow NULL parent menu

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2011-07-06 11:02:38 +00:00
parent 7c6a2a598c
commit e328846969

View File

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