fix by Egon to avoid endless loop when no matching item found

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-05-22 18:07:05 +00:00
parent 5009d37d51
commit bd1f3340cb

View File

@@ -1315,7 +1315,7 @@ wxTreeItemId wxGenericTreeCtrl::FindItem(const wxTreeItemId& idParent,
}
// and try all the items (stop when we get to the one we started from)
while ( id != idParent && !GetItemText(id).Lower().StartsWith(prefix) )
while ( id.IsOk() && (id != idParent) && !GetItemText(id).Lower().StartsWith(prefix) )
{
id = GetNext(id);
}