[haiku-commits] r33577 - haiku/trunk/src/apps/debugger/gui/team_window

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 06:50:27 +0200 (CEST)

Author: bonefish
Date: 2009-10-14 06:50:27 +0200 (Wed, 14 Oct 2009)
New Revision: 33577
Changeset: http://dev.haiku-os.org/changeset/33577/haiku

Modified:
   haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp
Log:
Don't crash on stack frames without recognized function.


Modified: haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp     
2009-10-14 00:14:34 UTC (rev 33576)
+++ haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp     
2009-10-14 04:50:27 UTC (rev 33577)
@@ -907,8 +907,10 @@
 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 @@
                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();


Other related posts:

  • » [haiku-commits] r33577 - haiku/trunk/src/apps/debugger/gui/team_window - ingo_weinhold