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.
This commit is contained in:
parent
fc23dd2ca2
commit
7198436cc2
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user