Permalink
Browse files

fix new way of doing setjmp in libpng 1.5

  • Loading branch information...
1 parent dcd4c8a commit 1037293f3d315e73443b90b38fea225720415cbb @bluesmoon committed Jun 12, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/pngtocss.c
View
@@ -336,7 +336,11 @@ static status read_png(FILE *f, gradient *g)
}
/* TODO Figure out how to do this without setjmp */
+#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf)) {
+#else
+ if (setjmp(png_jmpbuf(png_ptr))) {
+#endif
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return E_INTERNAL;
}

0 comments on commit 1037293

Please sign in to comment.