mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(MPNG) Add error goto label
This commit is contained in:
parent
6c98b8ab3a
commit
d94679e14b
@ -81,7 +81,7 @@ bool texture_image_load(struct texture_image *out_img, const char *path)
|
|||||||
texture_image_load_file(read, ptr, path, &len);
|
texture_image_load_file(read, ptr, path, &len);
|
||||||
|
|
||||||
if (!png_decode(ptr, len, &img, FMT_ARGB8888))
|
if (!png_decode(ptr, len, &img, FMT_ARGB8888))
|
||||||
return false;
|
goto error;
|
||||||
|
|
||||||
out_img->width = img.width;
|
out_img->width = img.width;
|
||||||
out_img->height = img.height;
|
out_img->height = img.height;
|
||||||
@ -90,4 +90,9 @@ bool texture_image_load(struct texture_image *out_img, const char *path)
|
|||||||
nbio_free(read);
|
nbio_free(read);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
error:
|
||||||
|
if (read)
|
||||||
|
nbio_free(read);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user