From 3fe48198b5a864c3dc2f14d7f9b5e7bfb448d34c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 10 Jan 2009 19:58:53 +0000 Subject: [PATCH] guarding against NULL peers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/menu.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } }