Added test to prevent crash in LogMenuEvent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2001-03-02 12:49:26 +00:00
parent 895f5af753
commit d3d6931427

View 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() )
{