Do not delete mDecompThread as it can lead to subtle race conditions and crashes during process shutdown.

meow-7.2.2
Nicky 2018-05-14 12:09:32 +02:00
parent 576ef52c45
commit a31b82eaca
1 changed files with 6 additions and 2 deletions

View File

@ -3463,8 +3463,12 @@ void LLMeshRepository::shutdown()
if (mDecompThread)
{
mDecompThread->shutdown();
delete mDecompThread;
mDecompThread->shutdown();
// <FS:ND> Deleting the thread at this point can lead to very subtle memory corruption due to the thread still possibly executing code that comes after shutdown does return.
// Not nice, but leak it and let the OS clean up once process exit is complete.
// delete mDecompThread;
mDecompThread = NULL;
}