Ensure that node pointer is valid before traversing.
This commit is contained in:
@@ -197,8 +197,6 @@ UiUtils::PrintValueNodeGraph(BString& _output, StackFrame* frame,
|
||||
return;
|
||||
}
|
||||
|
||||
_output << " {\n";
|
||||
|
||||
if (node->CountChildren() == 1
|
||||
&& node->GetType()->Kind() == TYPE_ADDRESS
|
||||
&& node->ChildAt(0)->GetType()->Kind() == TYPE_COMPOUND) {
|
||||
@@ -208,6 +206,9 @@ UiUtils::PrintValueNodeGraph(BString& _output, StackFrame* frame,
|
||||
node = node->ChildAt(0)->Node();
|
||||
}
|
||||
|
||||
if (node != NULL) {
|
||||
_output << " {\n";
|
||||
|
||||
for (int32 i = 0; i < node->CountChildren(); i++) {
|
||||
// don't dump compound nodes if our depth limit won't allow
|
||||
// us to traverse into their children anyways, and the top
|
||||
@@ -220,6 +221,7 @@ UiUtils::PrintValueNodeGraph(BString& _output, StackFrame* frame,
|
||||
}
|
||||
_output.Append('\t', indentLevel);
|
||||
_output << "}\n";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user