From 6a1be56686799e687cb682abf146b88b5df5c1fe Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Sat, 17 Mar 2001 11:55:05 +0000 Subject: [PATCH] Minor runloop fix git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9427 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 2 ++ Source/NSRunLoop.m | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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; }