From 8b04a037d02d0471d2f92a3ddda374848feea8b1 Mon Sep 17 00:00:00 2001 From: Sylvain Bougnoux Date: Thu, 15 Jul 1999 10:04:09 +0000 Subject: [PATCH] fixed SelectItem call with an invalid item git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectrl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 39db6e73e2..cf6d5042e1 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -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),