From 3d81a07f060be0565786078a382e4b473e256fd6 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 5 Jun 2011 21:02:55 +0000 Subject: [PATCH] support for png 1.5.x, should work fine with 1.4.x - closes #772 --- include/mapnik/png_io.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index 06abc570d..6b93ea55a 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -88,7 +88,8 @@ void save_as_png(T1 & file , T2 const& image) png_destroy_write_struct(&png_ptr,(png_infopp)0); return; } - if (setjmp(png_jmpbuf(png_ptr))) + jmp_buf* jmp_context = (jmp_buf*) png_get_error_ptr(png_ptr); + if (jmp_context) { png_destroy_write_struct(&png_ptr, &info_ptr); return; @@ -237,7 +238,8 @@ void save_as_png(T & file, std::vector & palette, png_destroy_write_struct(&png_ptr,(png_infopp)0); return; } - if (setjmp(png_jmpbuf(png_ptr))) + jmp_buf* jmp_context = (jmp_buf*) png_get_error_ptr(png_ptr); + if (jmp_context) { png_destroy_write_struct(&png_ptr, &info_ptr); return;