From 00e8c2009ebba5c64ec7768b44220385c708e492 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 9 May 2003 21:48:24 +0000 Subject: [PATCH] Fixed crash in EnsureVisible in wxTR_HIDE_ROOT mode git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectlg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index edc1b0d090..f0179e06f5 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1855,7 +1855,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(); @@ -2815,6 +2815,7 @@ wxTreeItemId wxGenericTreeCtrl::HitTest(const wxPoint& point, int& flags) } wxGenericTreeItem *hit = m_anchor->HitTest(CalcUnscrolledPosition(point), + // wxGenericTreeItem *hit = m_anchor->HitTest(point, this, flags, 0); if (hit == NULL) {