diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-07-26 20:06:26 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-07-26 20:06:26 +0300 |
commit | e24d4c9f4d2f37ee80685c6ab276633b94b366b8 (patch) | |
tree | d78c2549bb124973e87cce4f53273fd7a2e01687 /indra/llimage/llimage.cpp | |
parent | 8c8a44f430cc373d3a09308c5efdc420c1571d11 (diff) |
MAINT-8923 Better allocation failure handling, createGLTexture crashes
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r-- | indra/llimage/llimage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index dca03cfe04..1a4dd2ca99 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -889,7 +889,7 @@ void LLImageRaw::setDataAndSize(U8 *data, S32 width, S32 height, S8 components) bool LLImageRaw::resize(U16 width, U16 height, S8 components) { - if ((getWidth() == width) && (getHeight() == height) && (getComponents() == components)) + if ((getWidth() == width) && (getHeight() == height) && (getComponents() == components) && !isBufferInvalid()) { return true; } @@ -898,7 +898,7 @@ bool LLImageRaw::resize(U16 width, U16 height, S8 components) allocateDataSize(width,height,components); - return true; + return !isBufferInvalid(); } bool LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height, |