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
This commit is contained in:
Vadim Zeitlin 2007-03-30 12:57:15 +00:00
parent 3f0df5c401
commit 8a536fa330

View File

@ -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);