From 8a536fa330556098aef80de87f0f0e7ee7e11116 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 30 Mar 2007 12:57:15 +0000 Subject: [PATCH] don't crash when attempting to select hidden tree root (bug 1681118) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/treectrl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 3a83d4f057..86a5446cfd 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -1667,6 +1667,8 @@ void wxTreeCtrl::UnselectAll() void wxTreeCtrl::SelectItem(const wxTreeItemId& item, bool select) { + wxCHECK_RET( !IsHiddenRoot(item), _T("can't select hidden root item") ); + if ( m_windowStyle & wxTR_MULTIPLE ) { ::SelectItem(GetHwnd(), HITEM(item), select); -- 2.45.2