From fbfee1f1e3a87237eb72fdf25803b1fcbde59963 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 16 Dec 2010 09:28:24 -0500 Subject: [PATCH] In -[DebuggerController debuggerConnected], do not do anything if we're not attached. --- Source/DebuggerConnection.m | 6 +++--- Source/DebuggerController.m | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/DebuggerConnection.m b/Source/DebuggerConnection.m index 909b4dc..acf2425 100644 --- a/Source/DebuggerConnection.m +++ b/Source/DebuggerConnection.m @@ -34,7 +34,7 @@ @property NSUInteger lastWrittenTransaction; @property (retain) NSMutableArray* queuedWrites; -- (void)connectionThreadStart; +- (void)runNetworkThread; - (void)socketDidAccept; - (void)socketDisconnected; @@ -234,13 +234,13 @@ void PerformQuitSignal(void* info) // socket. return; } - [NSThread detachNewThreadSelector:@selector(connectionThreadStart) toTarget:self withObject:nil]; + [NSThread detachNewThreadSelector:@selector(runNetworkThread) toTarget:self withObject:nil]; } /** * Creates, connects to, and schedules a CFSocket. */ -- (void)connectionThreadStart +- (void)runNetworkThread { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index c3d2dce..43b71f9 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -139,6 +139,8 @@ - (void)debuggerConnected { [errormsg setHidden:YES]; + if (!self.connection.attached) + return; [self startDebugger]; } -- 2.43.5