]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/menu/menu.cpp
wxFileSelector should have file name only, not path, passed to 3rd arg
[wxWidgets.git] / samples / menu / menu.cpp
index 98f94475cb20ec0a449e1dcd55ef5c32711cb4ab..bb2e4de3b6d16a553bca316258550a483ad2e311 100644 (file)
@@ -346,6 +346,8 @@ wxMenuItem *MyFrame::GetLastMenuItem() const
 void MyFrame::LogMenuEvent(const wxCommandEvent& event)
 {
     int id = event.GetId();
+    if (!GetMenuBar()->FindItem(id))
+        return;
     wxString msg = wxString::Format("Menu command %d", id);
     if ( GetMenuBar()->FindItem(id)->IsCheckable() )
     {