summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-07-06 10:22:50 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-07-06 10:22:50 +0300
commit69de29d74e2171a032472f54581b4eceff1ad099 (patch)
treee10ff15cd5e6621e670a282fd054ad8c260f72e9
parent85fd2dc8709405dda908b4b714f6461744c1ca22 (diff)
MAINT-6552 Contribution: Viewer sometimes crashes when opening oversized textures
-rwxr-xr-xdoc/contributions.txt1
-rw-r--r--indra/newview/llviewertexture.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index b118439f26..f1111a2210 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -195,6 +195,7 @@ Ansariel Hiller
MAINT-6432
MAINT-6513
MAINT-6514
+ MAINT-6552
Aralara Rajal
Arare Chantilly
CHUIBUG-191
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index ed719ae418..ac997d7525 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1200,7 +1200,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
{
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
- if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+ if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
{
// scale oversized icon, no need to give more work to gl
mRawImage->scale(expected_width, expected_height);