From ff38281aa1a7576df9e67ac756e7e1087681305e 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/trunk@20566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index f0be2d8723..f2134ffc89 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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(); -- 2.47.2