summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-06 20:01:49 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-06 20:02:46 +0200
commit9d1d8690bf29e80b9a4601f094907be7bc7331c6 (patch)
tree35e66d122771b101bf96e49616340c06060ddc0b
parent2f031e03d659eb0f1110d5ccec936767428eb3f5 (diff)
#3673 Crash at updateImageDecodePriority
-rw-r--r--indra/newview/llviewertexturelist.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b07957a492..ae723b4068 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -910,7 +910,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
U32 face_count = 0;
// get adjusted bias based on image resolution
- F32 max_discard = F32(imagep->getMaxDiscardLevel());
+ LLImageGL* img = imagep->getGLTexture();
+ F32 max_discard = F32(img ? img->getMaxDiscardLevel() : MAX_DISCARD_LEVEL);
F32 bias = llclamp(max_discard - 2.f, 1.f, LLViewerTexture::sDesiredDiscardBias);
// convert bias into a vsize scaler