]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed SelectItem call with an invalid item
authorSylvain Bougnoux <bougnoux@imra-europe.com>
Thu, 15 Jul 1999 10:04:09 +0000 (10:04 +0000)
committerSylvain Bougnoux <bougnoux@imra-europe.com>
Thu, 15 Jul 1999 10:04:09 +0000 (10:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectrl.cpp

index 39db6e73e24d3e2a993c4189812b7ac4ccbd15b7..cf6d5042e1b255d49a4d10f0bb08b4c0dbb074b2 100644 (file)
@@ -1012,6 +1012,8 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
                            bool unselect_others,
                            bool extended_select)
 {
+    wxCHECK_RET( itemId.IsOk(), _T("invalid tree item") );
+
     bool is_single=!(GetWindowStyleFlag() & wxTR_MULTIPLE);
 
     //wxCHECK_RET( ( (!unselect_others) && is_single),