aboutsummaryrefslogtreecommitdiff
blob: 0d648d06ef50ce6541395211b58baba4b5c67ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Changes the png buffer pointer to the new function call.
Written and tested by Lucas Mitrak.
https://bugs.gentoo.org/756061

--- a/src/raster-png.cxx
+++ b/src/raster-png.cxx
@@ -43,7 +43,7 @@ ByteRaster *read_png_image(const char *file_name)
    // Because we didn't set up any error handlers, we need to be
    // prepared to handle longjmps out of the library on error
    // conditions.
-   if( setjmp(png_ptr->jmpbuf) )
+   if( setjmp(png_jmpbuf(png_ptr)) )
    {
       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
       fclose(fp);
@@ -133,7 +133,7 @@ bool write_png_image(const char *file_name, const ByteRaster& img)
       return false;
    }
 
-   if( setjmp(png_ptr->jmpbuf) )
+   if( setjmp(png_jmpbuf(png_ptr)) )
    {
       fclose(fp);
       png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);