From 99189ff2d5e96434cdc58115bbc03614f8e50773 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 7 Jun 2022 15:24:40 -0500 Subject: SL-17547 Fix for crash on shutdown introduced in last commit. --- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/llviewertexture.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2bfdfe1789..0fa425cf22 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3011,7 +3011,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) { LL_PROFILE_ZONE_SCOPED; - mRequestQueue.post([=]() + mRequestQueue.tryPost([=]() { LLTextureFetchWorker* worker = getWorker(id); if (worker) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ae480bcc35..b7633545f9 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -653,7 +653,10 @@ void LLViewerTexture::cleanup() { notifyAboutMissingAsset(); - LLAppViewer::getTextureFetch()->updateRequestPriority(mID, 0.f); + if (LLAppViewer::getTextureFetch()) + { + LLAppViewer::getTextureFetch()->updateRequestPriority(mID, 0.f); + } mFaceList[LLRender::DIFFUSE_MAP].clear(); mFaceList[LLRender::NORMAL_MAP].clear(); -- cgit v1.2.3