X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e3a7b97ec7ac9226a7ee288b6458dff65190618..245f35816d761212279e8cf223475efb7a367553:/src/generic/treectlg.cpp 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();