From f8106e9f3fbf2f075bc01c93ec9681b7848bc742 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 5 Nov 2018 17:52:45 +0200 Subject: SL-9991 FIXED Crash in LLViewerLODTexture::processTextureStats() --- indra/newview/llfloaterworldmap.cpp | 4 ++-- indra/newview/llviewertexture.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 3c3b004d2c..1e9c9ce5e0 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -300,8 +300,8 @@ BOOL LLFloaterWorldMap::postBuild() landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); mListLandmarkCombo = dynamic_cast(landmark_combo); - mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f); - getChild("zoom slider")->setValue(LLWorldMapView::sMapScale); + mCurZoomVal = log(LLWorldMapView::sMapScale/256.f)/log(2.f); + getChild("zoom slider")->setValue(mCurZoomVal); setDefaultBtn(NULL); 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 -- cgit v1.2.3