From e24d4c9f4d2f37ee80685c6ab276633b94b366b8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 Jul 2018 20:06:26 +0300 Subject: MAINT-8923 Better allocation failure handling, createGLTexture crashes --- indra/llimage/llimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llimage/llimage.cpp') 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, -- cgit v1.2.3