mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 10:49:48 +02:00
- attempt to fix irc thread crash foudn by tomreyn
This commit is contained in:
@@ -304,14 +304,21 @@ int Thread::beginExecution(void* data) {
|
|||||||
if(thread->threadObjectValid() == true) {
|
if(thread->threadObjectValid() == true) {
|
||||||
safeMutex.Lock();
|
safeMutex.Lock();
|
||||||
thread->currentState = thrsExecuteAutoClean;
|
thread->currentState = thrsExecuteAutoClean;
|
||||||
safeMutex.ReleaseLock(true);
|
safeMutex.ReleaseLock();
|
||||||
thread->queueAutoCleanThread();
|
thread->queueAutoCleanThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
||||||
safeMutex.Lock();
|
MutexSafeWrapper safeMutex2(thread->mutexthreadAccessor);
|
||||||
thread->currentState = thrsExecuteComplete;
|
|
||||||
safeMutex.ReleaseLock();
|
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
||||||
|
if(thread->threadObjectValid() == true) {
|
||||||
|
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
||||||
|
thread->currentState = thrsExecuteComplete;
|
||||||
|
}
|
||||||
|
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
||||||
|
safeMutex2.ReleaseLock();
|
||||||
|
if(Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n",__LINE__);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user