summaryrefslogtreecommitdiff
blob: 46be00ebd0e0e8e5d2cd7f629773a6f73e241f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/SFML/Graphics/ImageLoader.cpp
+++ src/SFML/Graphics/ImageLoader.cpp
@@ -44,7 +44,7 @@
     void PngErrorHandler(png_structp Png, png_const_charp Message)
     {
         std::cerr << "Failed to write PNG image. Reason : " << Message << std::endl;
-        longjmp(Png->jmpbuf, 1);
+        longjmp(png_jmpbuf(Png), 1);
     }
 }
 
@@ -289,7 +289,7 @@
     }
 
     // For proper error handling...
-    if (setjmp(Png->jmpbuf))
+    if (setjmp(png_jmpbuf(Png)))
     {
         png_destroy_write_struct(&Png, &PngInfo);
         return false;