diff options
author | Rider Linden <rider@lindenlab.com> | 2018-09-26 13:46:45 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-09-26 13:46:45 -0700 |
commit | 78866b33a9f3a44db11a18245e8a37c834297a46 (patch) | |
tree | fd5c39a17334de8602ee2f20df020eaaa6e01e55 /indra/llrender/llimagegl.cpp | |
parent | 2d5fa7a732661f97b028ddcbabdd4fb3ba825a52 (diff) | |
parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) |
Merge
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 9b545bca0a..25ec493fa2 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1285,7 +1285,8 @@ BOOL LLImageGL::createGLTexture() stop_glerror(); if (!mTexName) { - LL_ERRS() << "LLImageGL::createGLTexture failed to make an empty texture" << LL_ENDL; + LL_WARNS() << "LLImageGL::createGLTexture failed to make an empty texture" << LL_ENDL; + return FALSE; } return TRUE ; @@ -1418,7 +1419,16 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ } if (!mTexName) { - LL_ERRS() << "LLImageGL::createGLTexture failed to make texture" << LL_ENDL; + if (old_name) + { + sGlobalTextureMemory -= mTextureMemory; + LLImageGL::deleteTextures(1, &old_name); + disclaimMem(mTextureMemory); + stop_glerror(); + } + + LL_WARNS() << "LLImageGL::createGLTexture failed to make texture" << LL_ENDL; + return FALSE; } if (mUseMipMaps) |