[haiku-commits] haiku: hrev45569 - src/apps/debugger/user_interface/gui/team_window

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 27 Apr 2013 21:19:13 +0200 (CEST)

hrev45569 adds 1 changeset to branch 'master'
old head: fc23dd2ca28748edc82b1beb170e2a5c3e66eb22
new head: 7198436cc28efa74e16de67ec8cc1068a9856068
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=7198436+%5Efc23dd2

----------------------------------------------------------------------------

7198436: Fix several crash problems in Debugger.
  
  - When removing a value node in response to ValueNodeChildrenDeleted,
    we need to recurse down and ensure that each node's children are
    likewise notified/removed. Otherwise we end up with deleted child
    nodes in the node table, which in turn led to potential crashes when
    either adjusting a node's type and/or its visible array range.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45569
Commit:      7198436cc28efa74e16de67ec8cc1068a9856068
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7198436
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Sat Apr 27 19:11:04 2013 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+)
.../debugger/user_interface/gui/team_window/VariablesView.cpp     | 4 ++++

----------------------------------------------------------------------------

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 0a1c9a1..df5ec67 100644
--- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
@@ -1039,6 +1039,10 @@ 
VariablesView::VariableTableModel::ValueNodeChildrenDeleted(ValueNode* node)
 
        for (int32 i = modelNode->CountChildren() - 1; i >= 0 ; i--) {
                BReference<ModelNode> childNode = modelNode->ChildAt(i);
+               // recursively remove the current node's child hierarchy.
+               if (childNode->CountChildren() != 0)
+                       
ValueNodeChildrenDeleted(childNode->NodeChild()->Node());
+
                TreeTablePath treePath;
                if (GetTreePath(childNode, treePath)) {
                        int32 index = treePath.RemoveLastComponent();


Other related posts:

  • » [haiku-commits] haiku: hrev45569 - src/apps/debugger/user_interface/gui/team_window - anevilyak