From 9f9a4288a36cd1e16b3c202a5891d3e327fc5059 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Jan 2017 02:21:05 +0100 Subject: [PATCH] return 'false' if info is NULL (retro_load_game) --- libretro/libretro.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 1a5c121..779f039 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -1926,13 +1926,16 @@ void retro_cheat_set(unsigned index, bool enabled, const char *code) bool retro_load_game(const struct retro_game_info *info) { int i; - const char *dir; + const char *dir = NULL; #if defined(_WIN32) - char slash = '\\'; + char slash = '\\'; #else - char slash = '/'; + char slash = '/'; #endif + if (!info) + return false; + extract_directory(g_rom_dir, info->path, sizeof(g_rom_dir)); extract_name(g_rom_name, info->path, sizeof(g_rom_name));