summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-11-05 17:52:45 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-11-05 17:52:45 +0200
commitf8106e9f3fbf2f075bc01c93ec9681b7848bc742 (patch)
treeda17daa4f55e2712eef863905d8d7dd3eef7f6f7 /indra/newview/llviewertexture.cpp
parent74d28082b00f8d4491ba58adc8a7e8f8adeb80e8 (diff)
SL-9991 FIXED Crash in LLViewerLODTexture::processTextureStats()
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 2e366835d9..d5aa249883 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3171,6 +3171,7 @@ void LLViewerLODTexture::processTextureStats()
if (mKnownDrawWidth && mKnownDrawHeight)
{
S32 draw_texels = mKnownDrawWidth * mKnownDrawHeight;
+ draw_texels = llclamp(draw_texels, MIN_IMAGE_AREA, MAX_IMAGE_AREA);
// Use log_4 because we're in square-pixel space, so an image
// with twice the width and twice the height will have mTexelsPerImage