Do the things from the last commit in the correct order.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33523 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
theraven 2011-07-11 15:12:47 +00:00
parent 7996b99819
commit 853f52049b

View file

@ -329,13 +329,14 @@ GSCurrentThread(void)
NSThread *thr = pthread_getspecific(thread_object_key);
if (nil == thr)
{
GSRegisterCurrentThread();
assert(GSRegisterCurrentThread() && @"Failed to register thread");
thr = pthread_getspecific(thread_object_key);
if ((defaultThread == nil) && IS_MAIN_PTHREAD)
{
defaultThread = thr;
defaultThread = [thr retain];
}
thr = pthread_getspecific(thread_object_key);
}
assert(nil != thr && @"No main thread");
return thr;
}