bug in wxMenuBase::FindChildItem() corrected

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-02 15:57:07 +00:00
parent 3096bd2fa7
commit 1dddf8389f

View File

@@ -301,9 +301,12 @@ wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const
size_t pos; size_t pos;
for ( pos = 0; node; pos++ ) for ( pos = 0; node; pos++ )
{ {
item = node->GetData(); if ( node->GetData()->GetId() == id )
if ( item->GetId() == id ) {
item = node->GetData();
break; break;
}
node = node->GetNext(); node = node->GetNext();
} }