summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-11-29 12:28:21 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-11-29 12:28:21 +0200
commitf2b32dafa4ddb7af6c2b775c51214d1ddf4fd98b (patch)
tree11caaf42f43cc540a44b90b33df18b0fe92bf3f6
parentb40ac4325cb234a05abcf43842b82669d76603d0 (diff)
MAINT-6729 Fix crash in LLImageGL::analyzeAlpha()
-rw-r--r--indra/newview/llviewertexture.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 178aa1e646..3cef34445a 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1419,11 +1419,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
destroyRawImage();
return FALSE;
}
- mNeedsCreateTexture = FALSE;
+ mNeedsCreateTexture = FALSE;
if (mRawImage.isNull())
{
LL_ERRS() << "LLViewerTexture trying to create texture with no Raw Image" << LL_ENDL;
}
+ if (mRawImage->isBufferInvalid())
+ {
+ LL_WARNS() << "Can't create a texture: invalid image data" << LL_ENDL;
+ destroyRawImage();
+ return FALSE;
+ }
// LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ",
// mRawDiscardLevel,
// mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize())