[ 1563875 ] wxTreeCtrl::FindItem asserts when item not found
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1395,10 +1395,12 @@ wxTreeItemId wxGenericTreeCtrl::FindItem(const wxTreeItemId& idParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and try all the items (stop when we get to the one we started from)
|
// 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);
|
id = GetNext(id);
|
||||||
}
|
}
|
||||||
|
// If we haven't found the item, id.IsOk() will be false, as per
|
||||||
|
// documentation
|
||||||
}
|
}
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
Reference in New Issue
Block a user