Merge pull request #12 from czarkoff/png14

Fix compatibility with newer libpng
This commit is contained in:
Daniel Beer 2016-08-11 10:37:47 +12:00 committed by GitHub
commit e6e8c381bb

View file

@ -284,9 +284,9 @@ out:
/* cleanup */
if (png_ptr) {
if (info_ptr)
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
else
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, (png_infopp)NULL);
}
if (infile)
fclose(infile);