Kolja Strohm 5 лет назад
Родитель
Сommit
359a6efc75
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Thread.cpp

+ 1 - 1
Thread.cpp

@@ -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;