support for png 1.5.x, should work fine with 1.4.x - closes #772

This commit is contained in:
Dane Springmeyer 2011-06-05 21:02:55 +00:00
parent 7c2549ff46
commit 3d81a07f06

View file

@ -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<mapnik::rgb> & 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;