X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc038829d566f4e0cfdb249fac1e67db8456e347..acc476c530e1730d9202b404ec0b0b87ae44ced6:/src/common/imagpng.cpp?ds=sidebyside diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index fcb4b0a0e6..98d1979572 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -168,14 +168,6 @@ void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data, WX_PNG_INFO(png_ptr)->stream.out->Write(data, length); } -// from pngerror.c -// so that the libpng doesn't send anything on stderr -void -PNGLINKAGEMODE wx_png_error(png_structp WXUNUSED(png_ptr), png_const_charp message) -{ - wxLogFatalError( wxString::FromAscii(message) ); -} - void PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message) { @@ -184,6 +176,17 @@ PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message) wxLogWarning( wxString::FromAscii(message) ); } +// from pngerror.c +// so that the libpng doesn't send anything on stderr +void +PNGLINKAGEMODE wx_png_error(png_structp WXUNUSED(png_ptr), png_const_charp message) +{ + // JS: deliver it to wx_png_warning and don't perform any more actions: + // libpng will jump back to the calling function (LoadFile and SaveFile) + // and allow it to handle the error + wx_png_warning(NULL, message); +} + } // extern "C" // ----------------------------------------------------------------------------