mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +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);
|
||||
|
||||
if (!png_decode(ptr, len, &img, FMT_ARGB8888))
|
||||
return false;
|
||||
goto error;
|
||||
|
||||
out_img->width = img.width;
|
||||
out_img->height = img.height;
|
||||
@ -90,4 +90,9 @@ bool texture_image_load(struct texture_image *out_img, const char *path)
|
||||
nbio_free(read);
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (read)
|
||||
nbio_free(read);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user