--- shapes/pngio.cc +++ shapes/pngio.cc @@ -79,7 +79,7 @@ } // Allocate info. structure. png_infop info = png_create_info_struct(png); - if (setjmp(png->jmpbuf)) // Handle errors. + if (setjmp(png_jmpbuf(png))) // Handle errors. { png_destroy_read_struct(&png, &info, 0); fclose(fp); @@ -208,7 +208,7 @@ } // Allocate info. structure. png_infop info = png_create_info_struct(png); - if (setjmp(png->jmpbuf)) // Handle errors. + if (setjmp(png_jmpbuf(png))) // Handle errors. { png_destroy_write_struct(&png, &info); fclose(fp); @@ -306,7 +306,7 @@ } // Allocate info. structure. png_infop info = png_create_info_struct(png); - if (setjmp(png->jmpbuf)) // Handle errors. + if (setjmp(png_jmpbuf(png))) // Handle errors. { png_destroy_read_struct(&png, &info, 0); fclose(fp);