Skip to content

Commit

Permalink
Merge pull request #1 from NoNick/master
Browse files Browse the repository at this point in the history
libpng compilation fix
  • Loading branch information
ugo-nama-kun committed Feb 8, 2017
2 parents c71e0f9 + 9165b71 commit a5da556
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vtorcs-RL-color/src/libs/tgfclient/img.cpp
Expand Up @@ -98,7 +98,7 @@ GfImgReadPng(const char *filename, int *widthp, int *heightp, float screen_gamma
return (unsigned char *)NULL;
}

if (setjmp(png_ptr->jmpbuf))
if (setjmp(png_jmpbuf(png_ptr)))
{
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
Expand Down Expand Up @@ -229,7 +229,7 @@ GfImgWritePng(unsigned char *img, const char *filename, int width, int height)
return -1;
}

if (setjmp(png_ptr->jmpbuf)) {
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);
return -1;
Expand Down
2 changes: 1 addition & 1 deletion vtorcs-RL-color/src/misc/png2jpg/png2jpg.c
Expand Up @@ -90,7 +90,7 @@ ImgReadPng(FILE *fp, int *widthp, int *heightp, float screen_gamma)
return (unsigned char *)NULL;
}

if (setjmp(png_ptr->jmpbuf))
if (setjmp(png_jmpbuf(png_ptr)))
{
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
Expand Down

0 comments on commit a5da556

Please sign in to comment.