diff options
Diffstat (limited to 'indra/llimage/llimagejpeg.cpp')
| -rw-r--r-- | indra/llimage/llimagejpeg.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index ab6c593fc2..803d8f17fc 100644 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -31,7 +31,7 @@ #include "llerror.h" #include "llexception.h" -#if !LL_ARM64 +#if !(LL_DARWIN && defined(__arm64__)) jmp_buf LLImageJPEG::sSetjmpBuffer ; #endif LLImageJPEG::LLImageJPEG(S32 quality) @@ -80,9 +80,8 @@ 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 - //except in the case of AARCH64/ARM64 where setjmp will crash // -#if !LL_ARM64 +#if !(LL_DARWIN && defined(__arm64__)) if(setjmp(sSetjmpBuffer)) { jpeg_destroy_decompress(&cinfo); @@ -228,7 +227,7 @@ 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_ARM64 +#if !(LL_DARWIN && defined(__arm64__)) if(setjmp(sSetjmpBuffer)) { jpeg_destroy_decompress(&cinfo); @@ -438,8 +437,8 @@ void LLImageJPEG::errorExit( j_common_ptr cinfo ) // Let the memory manager delete any temp files jpeg_destroy(cinfo); -#if !LL_ARM64 // Return control to the setjmp point +#if !(LL_DARWIN && defined(__arm64__)) longjmp(sSetjmpBuffer, 1) ; #endif } @@ -559,7 +558,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_ARM64 +#if !(LL_DARWIN && defined(__arm64__)) if( setjmp(sSetjmpBuffer) ) { // If we get here, the JPEG code has signaled an error. |
