]> git.saurik.com Git - wxWidgets.git/commitdiff
tree ctrl sorting shouldn't crash when items don't have data
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 7 May 1999 18:02:41 +0000 (18:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 7 May 1999 18:02:41 +0000 (18:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/treectrl.cpp

index eb6dfc49774a897eaf883c1253c905ccc3225502..89f4ad0dbb7e1cdd9f9ad17ce97ff705ca4046d6 100644 (file)
@@ -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());
 }