Fixed crash in EnsureVisible in wxTR_HIDE_ROOT mode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2003-05-09 21:48:24 +00:00
parent 243dbf1a50
commit ff38281aa1

View File

@ -1884,7 +1884,7 @@ void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item)
if ( HasFlag(wxTR_HIDE_ROOT) )
{
while ( parent != m_anchor )
while ( parent && parent != m_anchor )
{
Expand(parent);
parent = parent->GetParent();