From 3d8706cbd7ab3c3c4c70cc6751040ef880cdfd4b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 3 Apr 2009 23:50:50 -0400 Subject: [PATCH] Before setting selectedVariable, we need to make sure there is a selection! * Source/DebuggerController.m: (stepIn:) (stepOut:) (stepOver:) --- Source/DebuggerController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index effd641..f55764a 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -170,7 +170,8 @@ */ - (IBAction)stepIn:(id)sender { - selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; + if ([[variablesTreeController selectedObjects] count] > 0) + selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; StackFrame *frame = [connection stepIn]; if ([frame isShiftedFrame:[stackController peek]]) @@ -184,7 +185,8 @@ */ - (IBAction)stepOut:(id)sender { - selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; + if ([[variablesTreeController selectedObjects] count] > 0) + selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; StackFrame *frame = [connection stepOut]; [stackController pop]; // frame we were out of @@ -198,7 +200,8 @@ */ - (IBAction)stepOver:(id)sender { - selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; + if ([[variablesTreeController selectedObjects] count] > 0) + selectedVariable = [[variablesTreeController selectedObjects] objectAtIndex:0]; StackFrame *frame = [connection stepOver]; [stackController pop]; -- 2.43.5