git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35775
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
else if ( id != 0 && command.menu.menuRef != 0 && command.menu.menuItemIndex != 0 )
{
- GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , (UInt32*) &item ) ;
+ wxMenu* itsMenu = NULL ;
+ UInt32 refCon ;
+ GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , &refCon ) ;
+ // make sure it is one of our own menus, otherwise don't touch
+ itsMenu = wxFindMenuFromMacMenu( command.menu.menuRef ) ;
+ if ( itsMenu != NULL )
+ {
+ item = (wxMenuItem*) refCon ;
+ }
}
if ( item )