diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-07-31 17:26:27 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-07-31 18:16:18 +0300 |
commit | beb177bb23af4885b2a6f16798a62d1ca9ac0a02 (patch) | |
tree | 4c685ae1b8bf5878afe081351764a7e07ad3e2ed /indra/newview/llviewertexturelist.cpp | |
parent | c3b678276dadb7aded8e8aeb3742524766f5ad8a (diff) |
viewer#2153 Crash at LLViewerTextureList::updateImageDecodePriority
Crash at getTextureEntry which calls getTE(mTEOffset)
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d31c53d000..115934282f 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -948,7 +948,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // shows one letter at a time // // Maximum usage examples: huge chunk of terrain repeats texture - const LLTextureEntry* te = face->getTextureEntry(); + S32 te_offset = face->getTEOffset(); // offset is -1 if not inited + LLViewerObject* objp = face->getViewerObject(); + const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset); F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f; min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max()); vsize /= min_scale; |