don't crash if IsVisible() is called for the hidden virtual root

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-10-28 20:17:53 +00:00
parent 3095762276
commit d8c159fbfd

View File

@@ -1240,6 +1240,12 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
bool wxTreeCtrl::IsVisible(const wxTreeItemId& item) const
{
if ( item == wxTreeItemId(TVI_ROOT) )
{
// virtual (hidden) root is never visible
return FALSE;
}
// Bug in Gnu-Win32 headers, so don't use the macro TreeView_GetItemRect
RECT rect;