Browse Source

Support libpng-1.4 and 1.5 #18646

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/slim/trunk@226 7c53e7cc-98ea-0310-8f1f-a0b24da60408
iwamatsu 9 years ago
parent
commit
74fa192fd7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      image.cpp

+ 4 - 0
image.cpp

@@ -779,7 +779,11 @@ Image::readPng(const char *filename, int *width, int *height,
 								(png_infopp) NULL);
 	}
 
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+		if (setjmp(png_jmpbuf((png_ptr)))) {
+#else
 	if (setjmp(png_ptr->jmpbuf)) {
+#endif
 		goto png_destroy;
 	}