diff options
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/tree_view.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/views/tree_view.cc b/chrome/views/tree_view.cc index 5f04ac4..4e77db0 100644 --- a/chrome/views/tree_view.cc +++ b/chrome/views/tree_view.cc @@ -525,10 +525,9 @@ void TreeView::DeleteRootItems() { if (root_shown_) { RecursivelyDelete(GetNodeDetailsByTreeItem(root)); } else { - HTREEITEM node; - while ((node = TreeView_GetChild(tree_view_, root))) { - RecursivelyDelete(GetNodeDetailsByTreeItem(node)); - } + do { + RecursivelyDelete(GetNodeDetailsByTreeItem(root)); + } while ((root = TreeView_GetRoot(tree_view_))); } } } |