diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-07-27 05:49:07 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-07-27 05:49:07 +0300 |
commit | 2339e759fc2d6f36a4b9425022a22a747ec55dad (patch) | |
tree | cdd6316c4a2844fe1d827a146774e7fd9c27aad5 /indra/llimage | |
parent | 03bff896bd18b71c9a2d8e0b163647b1cd64b871 (diff) |
MAINT-4327/MAINT-6584 Supress the crash on memory allocation error when decoding J2C images
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimage.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 109ef7e904..91fa8c6ad1 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -773,7 +773,8 @@ const U8* LLImageBase::getData() const { if(mBadBufferAllocation) { - LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ; + LL_WARNS() << "Bad memory allocation for the image buffer!" << LL_ENDL ; + return NULL; } return mData; @@ -783,7 +784,8 @@ U8* LLImageBase::getData() { if(mBadBufferAllocation) { - LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ; + LL_WARNS() << "Bad memory allocation for the image buffer!" << LL_ENDL; + return NULL; } return mData; |