diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-07 15:12:58 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-07 15:12:58 -0500 |
commit | 197baebc62d1e4b922730266f77f4e6b555e2cac (patch) | |
tree | 617d62fdb87a4baaff2cbeb83407466f6e19eb22 /indra/newview/llviewertexture.cpp | |
parent | 5259fa811c11892ef150f853c9de5a8927fa68a6 (diff) |
SL-17547 Fix for crash in getCurrentDiscardLevelForFetching (and add runtime check and assertion to avoid crash in production and detect crash in development).
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2eb36a42be..ae480bcc35 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -653,6 +653,8 @@ void LLViewerTexture::cleanup() { notifyAboutMissingAsset(); + LLAppViewer::getTextureFetch()->updateRequestPriority(mID, 0.f); + mFaceList[LLRender::DIFFUSE_MAP].clear(); mFaceList[LLRender::NORMAL_MAP].clear(); mFaceList[LLRender::SPECULAR_MAP].clear(); @@ -1941,6 +1943,11 @@ bool LLViewerFetchedTexture::updateFetch() LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - in fast cache"); return false; } + if (mGLTexturep.isNull()) + { // fix for crash inside getCurrentDiscardLevelForFetching (shouldn't happen but appears to be happening) + llassert(false); + return false; + } S32 current_discard = getCurrentDiscardLevelForFetching(); S32 desired_discard = getDesiredDiscardLevel(); |