]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
define WX_XTI_TEMPLATE_FIX in case it is not yet
[wxWidgets.git] / src / generic / treectlg.cpp
index 86ec19c302c2800670db4ec7400c6c2d8259318d..986c96f5b416fd98eb8a7ba4e1e11a2f0acf6c05 100644 (file)
@@ -1091,7 +1091,7 @@ wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
     size_t *pIndex = (size_t *)&cookie;
     if ( *pIndex < children.Count() )
     {
-        return children.Item(*pIndex++);
+        return children.Item((*pIndex)++);
     }
     else
     {
@@ -2640,7 +2640,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
                     if (!next)
                     {
                         wxTreeItemId current = m_key_current;
-                        while (current && !next)
+                        while (current.IsOk() && !next)
                         {
                             current = GetItemParent( current );
                             if (current) next = GetNextSibling( current );