diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 78c7004732..3a8df23593 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3463,8 +3463,12 @@ void LLMeshRepository::shutdown() if (mDecompThread) { - mDecompThread->shutdown(); - delete mDecompThread; + mDecompThread->shutdown(); + + // 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; }