summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-08 17:21:05 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-08 17:21:05 +0200
commita65b586b184d9837e0586b4df0d2e758ccce63f6 (patch)
tree1708be9949cc91306f7fbf90fb5664d9e0eeb48d /indra/llrender/llimagegl.cpp
parent2abd0eef41a94d5626ca9f5f1b18aa959157c50f (diff)
MAINT-6729 Additional fix for crash in LLImageGL::analyzeAlpha()
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 81a5537f78..20cba68f84 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1267,6 +1267,12 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
llassert(gGLManager.mInited);
stop_glerror();
+ if (!imageraw || imageraw->isBufferInvalid())
+ {
+ LL_WARNS() << "Trying to create a texture from invalid image data" << LL_ENDL;
+ return FALSE;
+ }
+
if (discard_level < 0)
{
llassert(mCurrentDiscardLevel >= 0);