tree ctrl sorting shouldn't crash when items don't have data
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -854,6 +854,9 @@ static int CALLBACK TreeView_CompareCallback(wxTreeItemData *pItem1,
|
|||||||
wxTreeItemData *pItem2,
|
wxTreeItemData *pItem2,
|
||||||
wxTreeCtrl *tree)
|
wxTreeCtrl *tree)
|
||||||
{
|
{
|
||||||
|
wxCHECK_MSG( pItem1 && pItem2, 0,
|
||||||
|
_T("sorting tree without data doesn't make sense") );
|
||||||
|
|
||||||
return tree->OnCompareItems(pItem1->GetId(), pItem2->GetId());
|
return tree->OnCompareItems(pItem1->GetId(), pItem2->GetId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user