diff options
Diffstat (limited to 'indra/llimage/llimagejpeg.cpp')
-rw-r--r-- | indra/llimage/llimagejpeg.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index 0e7ec365d4..dd3efb3459 100644 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -79,11 +79,13 @@ bool LLImageJPEG::updateData() //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao // +#if !(LL_DARWIN && defined(__arm64__)) if(setjmp(sSetjmpBuffer)) { jpeg_destroy_decompress(&cinfo); return false; } +#endif try { // Now we can initialize the JPEG decompression object. @@ -223,11 +225,13 @@ bool LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao // +#if !(LL_DARWIN && defined(__arm64__)) if(setjmp(sSetjmpBuffer)) { jpeg_destroy_decompress(&cinfo); return true; // done } +#endif try { // Now we can initialize the JPEG decompression object. @@ -433,7 +437,9 @@ void LLImageJPEG::errorExit( j_common_ptr cinfo ) jpeg_destroy(cinfo); // Return control to the setjmp point +#if !(LL_DARWIN && defined(__arm64__)) longjmp(sSetjmpBuffer, 1) ; +#endif } // Decide whether to emit a trace or warning message. @@ -545,6 +551,7 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time ) //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao // +#if !(LL_DARWIN && defined(__arm64__)) if( setjmp(sSetjmpBuffer) ) { // If we get here, the JPEG code has signaled an error. @@ -555,6 +562,7 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time ) mOutputBufferSize = 0; return false; } +#endif try { |