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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user