projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
895f5af
)
Added test to prevent crash in LogMenuEvent
author
Julian Smart
<julian@anthemion.co.uk>
Fri, 2 Mar 2001 12:49:26 +0000
(12:49 +0000)
committer
Julian Smart
<julian@anthemion.co.uk>
Fri, 2 Mar 2001 12:49:26 +0000
(12:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9454
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
samples/menu/menu.cpp
patch
|
blob
|
blame
|
history
diff --git
a/samples/menu/menu.cpp
b/samples/menu/menu.cpp
index 98f94475cb20ec0a449e1dcd55ef5c32711cb4ab..bb2e4de3b6d16a553bca316258550a483ad2e311 100644
(file)
--- a/
samples/menu/menu.cpp
+++ b/
samples/menu/menu.cpp
@@
-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() )
{