diff --git a/sc2/src/sc2code/libs/threads/thrcommon.c b/sc2/src/sc2code/libs/threads/thrcommon.c index 1500e55f8..9c602e5b2 100644 --- a/sc2/src/sc2code/libs/threads/thrcommon.c +++ b/sc2/src/sc2code/libs/threads/thrcommon.c @@ -147,9 +147,9 @@ static char *ThreadNameNative (Uint32 native) { volatile Thread ptr; - ptr = threadQueue; if (threadQueueSemaphore) NativeSetSemaphore (threadQueueSemaphore); + ptr = threadQueue; while (ptr && NativeGetThreadID (ptr->native) != native) { ptr = ptr->next;