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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user