]> git.saurik.com Git - wxWidgets.git/commitdiff
guarding against NULL peers
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 10 Jan 2009 19:58:53 +0000 (19:58 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 10 Jan 2009 19:58:53 +0000 (19:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/menu.mm

index 22227936763e9abce033eb198a0305edb73c4373..09a753f6b56e7af3c143bb1977850ce26b7e639b 100644 (file)
@@ -91,7 +91,8 @@
     if ( menuimpl )
     {
         wxMenu* wxpeer = (wxMenu*) menuimpl->GetWXPeer();
-        wxpeer->HandleMenuOpened();
+        if ( wxpeer )
+            wxpeer->HandleMenuOpened();
     }
 }
 
     if ( menuimpl )
     {
         wxMenu* wxpeer = (wxMenu*) menuimpl->GetWXPeer();
-        wxpeer->HandleMenuClosed();
+        if ( wxpeer )
+            wxpeer->HandleMenuClosed();
     }
 }