diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-07-27 19:42:08 +0300 | 
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-07-27 19:42:08 +0300 | 
| commit | d406a086bace7ab2211981a1115238da76c3654a (patch) | |
| tree | ad7d9fbcc62c0b15a75989b428f5cb8c05089c1a | |
| parent | 0d14f3576d7a6b330043ea590c5e991b9252cc0a (diff) | |
MAINT-8923 Better allocation failure handling
| -rw-r--r-- | indra/llimage/llimagejpeg.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index 5c8b63a493..3b1b060c02 100644 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -29,6 +29,7 @@  #include "llimagejpeg.h"  #include "llerror.h" +#include "llexception.h"  jmp_buf	LLImageJPEG::sSetjmpBuffer ;  LLImageJPEG::LLImageJPEG(S32 quality)  @@ -383,7 +384,8 @@ boolean LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )    U8* new_buffer = new(std::nothrow) U8[ new_buffer_size ];    if (!new_buffer)    { -  	LL_ERRS() << "Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )" << LL_ENDL; +    self->setLastError("Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )"); +    LLTHROW(LLContinueError("Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )"));    	return false;    }    memcpy( new_buffer, self->mOutputBuffer, self->mOutputBufferSize );	/* Flawfinder: ignore */ | 
