From 3f882b445d4ca739db8a39715567bbbd178a1fd5 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Sun, 14 Jan 2018 11:14:26 +0000 Subject: [PATCH] Return error on get_proc_address failure Signed-off-by: Mahyar Koshkouei --- mpv-libretro.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mpv-libretro.c b/mpv-libretro.c index fb3fb17..6170d3f 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -159,7 +159,12 @@ void retro_set_environment(retro_environment_t cb) static void *get_proc_address_mpv(void *fn_ctx, const char *name) { - return (void *) hw_render.get_proc_address(name); + void *proc_addr = (void *) hw_render.get_proc_address(name); + + if(proc_addr == NULL) + log_cb(RETRO_LOG_ERROR, "Failure obtaining %s proc address\n", name); + + return proc_addr; } static void context_reset(void)