|
@@ -244,7 +244,7 @@ Thread *ThreadRegister::zThread( pthread_t handle )
|
|
|
EnterCriticalSection( &cs );
|
|
|
for( auto i = threads.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i->getThreadHandle() && GetThreadId( i->getThreadHandle() ) == GetThreadId( handle ) )
|
|
|
+ if( i->getThreadHandle() && GetThreadId( i->getThreadHandle() ) == GetThreadId( handle ) && GetThreadId( handle ) != 0 )
|
|
|
{
|
|
|
LeaveCriticalSection( &cs );
|
|
|
return i;
|