Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- libgthumb/thumb-cache.c.orig 2009-02-24 07:18:16.000000000 -0300
- +++ libgthumb/thumb-cache.c 2011-10-16 23:30:58.001840332 -0300
- @@ -245,8 +245,12 @@
- "Fatal error in PNG image file: %s",
- error_msg);
- }
- -
- - longjmp (png_save_ptr->jmpbuf, 1);
- + // if for libpng15
- + #if (PNG_LIBPNG_VER < 10500)
- + longjmp (png_save_ptr->jmpbuf, 1);
- + #else
- + png_longjmp (png_save_ptr, 1);
- + #endif
- }
- @@ -294,13 +298,23 @@
- info_ptr = png_create_info_struct (png_ptr);
- if (info_ptr == NULL) {
- - png_destroy_read_struct (&png_ptr, NULL, NULL);
- + // if for libpng15
- + #if (PNG_LIBPNG_VER < 10500)
- + png_destroy_read_struct (&png_ptr, NULL, NULL);
- + #else
- + png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
- + #endif
- fclose (f);
- return NULL;
- }
- - if (setjmp (png_ptr->jmpbuf)) {
- - png_destroy_read_struct (&png_ptr, NULL, NULL);
- + if (setjmp(png_jmpbuf(png_ptr))) {
- + // if for libpng15
- + #if (PNG_LIBPNG_VER < 10500)
- + png_destroy_read_struct (&png_ptr, NULL, NULL);
- + #else
- + png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
- + #endif
- fclose (f);
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment