From: Stefan Csomor Date: Sat, 10 Jan 2009 19:58:53 +0000 (+0000) Subject: guarding against NULL peers X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3fe48198b5a864c3dc2f14d7f9b5e7bfb448d34c guarding against NULL peers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/menu.mm b/src/osx/cocoa/menu.mm index 2222793676..09a753f6b5 100644 --- a/src/osx/cocoa/menu.mm +++ b/src/osx/cocoa/menu.mm @@ -91,7 +91,8 @@ if ( menuimpl ) { wxMenu* wxpeer = (wxMenu*) menuimpl->GetWXPeer(); - wxpeer->HandleMenuOpened(); + if ( wxpeer ) + wxpeer->HandleMenuOpened(); } } @@ -102,7 +103,8 @@ if ( menuimpl ) { wxMenu* wxpeer = (wxMenu*) menuimpl->GetWXPeer(); - wxpeer->HandleMenuClosed(); + if ( wxpeer ) + wxpeer->HandleMenuClosed(); } }