summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-09 00:00:56 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-09 00:00:56 +0200
commitabbf5ff4b95ba4711f9ba6352650ce5e23f4c1e0 (patch)
tree0559aebd49b3df0f2089fc1780ff1477d2d7a720 /indra/llrender
parentb5f861ae8498a76915e342a7b2d2cd23d565dd37 (diff)
parentb6dc755786fb06ab109eb36f402a25edaf24ce14 (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/llrender')
-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);