diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index 8780a40aaf..66bcf13eb6 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -489,6 +489,8 @@ static void png_reverse_filter_adam7_deinterlace_pass(uint32_t *data, static void png_reverse_filter_deinit(struct rpng_process *pngp) { + if (!pngp) + return; if (pngp->decoded_scanline) free(pngp->decoded_scanline); pngp->decoded_scanline = NULL; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 71fa92e811..54d8d784b8 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -874,7 +874,7 @@ static void xmb_render_messagebox_internal( unsigned width = video_info->width; unsigned height = video_info->height; struct string_list *list = string_split(message, "\n"); - if (!list) + if (!list || !xmb) return; if (list->elems == 0)