diff --git a/ChangeLog b/ChangeLog index cc396fd67..462a73c26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * Source/NSThread.m: Revise scheme for deallocation of thread dictionary ... keep it operating to avoid problems with stuff trying to use it while deing deallocated. Log memory leaks. + * Source/NSRunLoop.m: ([+currentRunLoop]) return nil if there is + no thread dictionary available (shouldn't happen). * Source/NSString.m: MINGW path handling fixes by Michael Scheibler stringByAppendingPath, isAbsolurtePath, and stringByStandardizingPath. diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index b553096bb..8c2bba365 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -714,9 +714,12 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks = r = [d objectForKey: key]; if (r == nil) { - r = [NSRunLoop new]; - [d setObject: r forKey: key]; - RELEASE(r); + if (d != nil) + { + r = [self new]; + [d setObject: r forKey: key]; + RELEASE(r); + } } return r; }