From: Vadim Zeitlin Date: Fri, 7 May 1999 18:02:41 +0000 (+0000) Subject: tree ctrl sorting shouldn't crash when items don't have data X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/096c9f9b986e3e614175efdbb880ef4f94283c42?ds=inline 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 --- diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index eb6dfc4977..89f4ad0dbb 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -854,6 +854,9 @@ static int CALLBACK TreeView_CompareCallback(wxTreeItemData *pItem1, wxTreeItemData *pItem2, wxTreeCtrl *tree) { + wxCHECK_MSG( pItem1 && pItem2, 0, + _T("sorting tree without data doesn't make sense") ); + return tree->OnCompareItems(pItem1->GetId(), pItem2->GetId()); }