]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed crash in EnsureVisible in wxTR_HIDE_ROOT mode
authorJulian Smart <julian@anthemion.co.uk>
Fri, 9 May 2003 21:48:24 +0000 (21:48 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 9 May 2003 21:48:24 +0000 (21:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index f0be2d87232f673442e02b2739abd069a3031cb6..f2134ffc897536ca1db819768e4ab91fa6096390 100644 (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();