Don't crash on stack frames without recognized function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-10-14 04:50:27 +00:00
parent 3363f0c5bd
commit 5f73bbcdce
@@ -907,8 +907,10 @@ VariablesView::_RequestVariableValue(Variable* variable)
void
VariablesView::_SaveViewState() const
{
if (fThread == NULL || fStackFrame == NULL)
if (fThread == NULL || fStackFrame == NULL
|| fStackFrame->Function() == NULL) {
return;
}
// get the function ID
FunctionID* functionID = fStackFrame->Function()->GetFunctionID();
@@ -946,8 +948,10 @@ VariablesView::_RestoreViewState()
fPreviousViewState = NULL;
}
if (fThread == NULL || fStackFrame == NULL)
if (fThread == NULL || fStackFrame == NULL
|| fStackFrame->Function() == NULL) {
return;
}
// get the function ID
FunctionID* functionID = fStackFrame->Function()->GetFunctionID();