Lines 311-317
int IMG_SavePNG_RW (SDL_Surface *face, S
Link Here
|
311 |
} |
311 |
} |
312 |
|
312 |
|
313 |
/* Set error handling. */ |
313 |
/* Set error handling. */ |
314 |
if (setjmp(png_ptr->jmpbuf)) |
314 |
if (setjmp(png_jmpbuf(png_ptr))) |
315 |
{ |
315 |
{ |
316 |
/* If we get here, we had a problem reading the file */ |
316 |
/* If we get here, we had a problem reading the file */ |
317 |
IMG_SetError("Error writing the PNG file"); |
317 |
IMG_SetError("Error writing the PNG file"); |
Lines 360-369
done:
Link Here
|
360 |
if (row_pointers != NULL) |
360 |
if (row_pointers != NULL) |
361 |
free (row_pointers); |
361 |
free (row_pointers); |
362 |
|
362 |
|
363 |
if (info_ptr != NULL && info_ptr->palette != NULL) |
363 |
png_destroy_write_struct (&png_ptr, &info_ptr); |
364 |
free (info_ptr->palette); |
|
|
365 |
|
366 |
png_destroy_write_struct (&png_ptr, (png_infopp)NULL); |
367 |
|
364 |
|
368 |
return result; |
365 |
return result; |
369 |
} |
366 |
} |