viewer#2850 Fix a crash in LLTextureFetchWorker

cache worker does not respond in case it was aborted, leaving behind a
handle.
master
Andrey Kleshchev 2024-10-14 23:17:00 +03:00 committed by Andrey Kleshchev
parent f3ee2f3796
commit 86f7e0d75e
1 changed files with 2 additions and 2 deletions

View File

@ -2090,7 +2090,7 @@ bool LLTextureFetchWorker::deleteOK()
// Allow any pending reads or writes to complete
if (mCacheReadHandle != LLTextureCache::nullHandle())
{
if (mFetcher->mTextureCache->readComplete(mCacheReadHandle, true))
if (!mFetcher->mTextureCache || mFetcher->mTextureCache->readComplete(mCacheReadHandle, true))
{
mCacheReadHandle = LLTextureCache::nullHandle();
}
@ -2101,7 +2101,7 @@ bool LLTextureFetchWorker::deleteOK()
}
if (mCacheWriteHandle != LLTextureCache::nullHandle())
{
if (mFetcher->mTextureCache->writeComplete(mCacheWriteHandle))
if (!mFetcher->mTextureCache || mFetcher->mTextureCache->writeComplete(mCacheWriteHandle))
{
mCacheWriteHandle = LLTextureCache::nullHandle();
}