don't crash when attempting to select hidden tree root (bug 1681118)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-30 12:57:15 +00:00
parent 993ad8f9b4
commit beb4cfa4c8

View File

@@ -1725,6 +1725,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);