Debugger: Fix crash in context menu builder.
A value node might not have a location due to e.g. issues resolving its parent. Guard against this case and simply return early as we won't be able to take any meaningful actions on such a node. Fixes the second crash listed in #10781.
This commit is contained in:
@@ -2042,6 +2042,9 @@ VariablesView::_GetContextActionsForNode(ModelNode* node,
|
|||||||
ContextActionList* actions)
|
ContextActionList* actions)
|
||||||
{
|
{
|
||||||
ValueLocation* location = node->NodeChild()->Location();
|
ValueLocation* location = node->NodeChild()->Location();
|
||||||
|
if (location == NULL)
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
status_t result = B_OK;
|
status_t result = B_OK;
|
||||||
BMessage* message = NULL;
|
BMessage* message = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user