mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
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:
parent
7996b99819
commit
853f52049b
1 changed files with 4 additions and 3 deletions
|
@ -329,13 +329,14 @@ GSCurrentThread(void)
|
||||||
NSThread *thr = pthread_getspecific(thread_object_key);
|
NSThread *thr = pthread_getspecific(thread_object_key);
|
||||||
if (nil == thr)
|
if (nil == thr)
|
||||||
{
|
{
|
||||||
GSRegisterCurrentThread();
|
assert(GSRegisterCurrentThread() && @"Failed to register thread");
|
||||||
|
thr = pthread_getspecific(thread_object_key);
|
||||||
if ((defaultThread == nil) && IS_MAIN_PTHREAD)
|
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;
|
return thr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue