diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index a055780a22..01ac6f1fd0 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -1035,7 +1035,7 @@ VariablesView::VariableTableModel::ValueNodeChildrenDeleted(ValueNode* node) fNodeTable.Remove(hiddenChild); } - for (int32 i = 0; i < modelNode->CountChildren(); i++) { + for (int32 i = modelNode->CountChildren() - 1; i >= 0 ; i--) { BReference childNode = modelNode->ChildAt(i); TreeTablePath treePath; if (GetTreePath(childNode, treePath)) {