From 1808b59b80df2192bc406ac35396835e419d195a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 11 Jun 2008 10:11:17 -0400 Subject: [PATCH] In DebuggerConnection, we need to protect against setting breakpoints with no active connection * Source/DebuggerConnection.m: (addBreakpoint:) (removeBreakpoint:) --- Source/DebuggerConnection.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/DebuggerConnection.m b/Source/DebuggerConnection.m index de543e1..8ac041b 100644 --- a/Source/DebuggerConnection.m +++ b/Source/DebuggerConnection.m @@ -242,6 +242,11 @@ */ - (void)addBreakpoint:(Breakpoint *)bp { + if (!connected) + { + return; + } + NSString *cmd = [self createCommand:[NSString stringWithFormat:@"breakpoint_set -t line -f %@ -n %i", [bp file], [bp line]]]; [socket send:cmd]; NSXMLDocument *info = [self processData:[socket receive]]; @@ -253,6 +258,11 @@ */ - (void)removeBreakpoint:(Breakpoint *)bp { + if (!connected) + { + return; + } + [socket send:[self createCommand:[NSString stringWithFormat:@"breakpoint_remove -d %i", [bp debuggerId]]]]; [socket receive]; } -- 2.22.5