support for png 1.5.x, should work fine with 1.4.x - closes #772
This commit is contained in:
parent
7c2549ff46
commit
3d81a07f06
1 changed files with 4 additions and 2 deletions
|
@ -88,7 +88,8 @@ void save_as_png(T1 & file , T2 const& image)
|
||||||
png_destroy_write_struct(&png_ptr,(png_infopp)0);
|
png_destroy_write_struct(&png_ptr,(png_infopp)0);
|
||||||
return;
|
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);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
return;
|
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);
|
png_destroy_write_struct(&png_ptr,(png_infopp)0);
|
||||||
return;
|
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);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue