Debugger: Fix potential crash.
VariablesView: - Check to ensure the stack frame actually does have a function object associated with it before attempting to use it, as this isn't always the case.
This commit is contained in:
@@ -2839,7 +2839,14 @@ VariablesView::_AddExpressionNode(ExpressionInfo* info)
|
||||
void
|
||||
VariablesView::_RestoreExpressionNodes()
|
||||
{
|
||||
FunctionID* id = fStackFrame->Function()->GetFunctionID();
|
||||
FunctionInstance* instance = fStackFrame->Function();
|
||||
if (instance == NULL)
|
||||
return;
|
||||
|
||||
FunctionID* id = instance->GetFunctionID();
|
||||
if (id == NULL)
|
||||
return;
|
||||
|
||||
BReference<FunctionID> idReference(id, true);
|
||||
|
||||
ExpressionInfoEntry* entry = fExpressions->Lookup(FunctionKey(id));
|
||||
@@ -2858,7 +2865,14 @@ void
|
||||
VariablesView::_SetExpressionNodeValue(ExpressionInfo* info, status_t result,
|
||||
Value* value)
|
||||
{
|
||||
FunctionID* id = fStackFrame->Function()->GetFunctionID();
|
||||
FunctionInstance* instance = fStackFrame->Function();
|
||||
if (instance == NULL)
|
||||
return;
|
||||
|
||||
FunctionID* id = instance->GetFunctionID();
|
||||
if (id == NULL)
|
||||
return;
|
||||
|
||||
BReference<FunctionID> idReference(id, true);
|
||||
|
||||
ExpressionInfoEntry* entry = fExpressions->Lookup(FunctionKey(id));
|
||||
|
||||
Reference in New Issue
Block a user