- Fixed a race condition that happened when LZMA compression finished and occasionally deadlocked the next call (solid installers weren't affected, just the compiler)

- Added try and catch for LZMA just in case one of the rare exceptions will be thrown (just compiler)


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3233 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-11-30 16:02:48 +00:00
parent 164f6462b3
commit 58ea8200ba
2 changed files with 35 additions and 40 deletions

View file

@ -139,16 +139,15 @@ int __stdcall lzmaDecompress(CLZMAStateP lzmaState)
EnterCriticalSection(&lzmaState->cs);
lzmaState->it_locked = TRUE;
if (lzmaState->finished)
{
LeaveCriticalSection(&lzmaState->cs);
return lzmaState->res;
}
while (lzmaState->dt_locked)
{
if (lzmaState->finished)
{
LeaveCriticalSection(&lzmaState->cs);
return lzmaState->res;
}
Sleep(0);
}
return 0;
}