diff --git a/ChangeLog b/ChangeLog index b3e55e433..70024e541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-28 Richard Frith-Macdonald + + * Source/NSConnection.m: Correct the text in exception when attempting + to read a response on an invalidated connection. + * Source/Additions/GSMime.m: + Fixup incorrect declaration of method in wrong class implementation. + 2009-07-27 David Ayers * Source/Additions/GSCompatibility.m ([-boolValue]): Only compile diff --git a/Source/NSConnection.m b/Source/NSConnection.m index a7eb73f68..e327cd8f1 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -2870,15 +2870,22 @@ static void callEncoder (DOContext *ctxt) NSTimeInterval last_interval = 0.0001; NSTimeInterval delay_interval = last_interval; NSDate *delay_date = nil; - NSRunLoop *runLoop = GSRunLoopForThread(nil); + NSRunLoop *runLoop; BOOL isLocked = NO; + if (_isValid == NO) + { + [NSException raise: NSObjectInaccessibleException + format: @"Connection has been invalidated"]; + } + /* * If we have sent out a request on a run loop that we don't already * know about, it must be on a new thread - so if we have multipleThreads * enabled, we must add the run loop of the new thread so that we can * get the reply in this thread. */ + runLoop = GSRunLoopForThread(nil); if ([_runLoops indexOfObjectIdenticalTo: runLoop] == NSNotFound) { if (_multipleThreads == YES)