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:
parent
895f5af753
commit
d3d6931427
1 changed files with 2 additions and 0 deletions
|
|
@ -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() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue