diff options
author | twinaphex | 2017-01-24 02:18:38 +0100 |
---|---|---|
committer | twinaphex | 2017-01-24 02:18:38 +0100 |
commit | 2747667a75d0512aaedfb166b7b92e9f99e14965 (patch) | |
tree | ecf5351f09b702b4589cc9ae26c5a06c510b3709 | |
parent | 4744011506bd3419af2c0999eaf8f4df05f03bfd (diff) | |
download | snesemu-2747667a75d0512aaedfb166b7b92e9f99e14965.tar.gz snesemu-2747667a75d0512aaedfb166b7b92e9f99e14965.tar.bz2 snesemu-2747667a75d0512aaedfb166b7b92e9f99e14965.zip |
return false inside retro_load_game if game is NULL
-rw-r--r-- | libretro.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -873,21 +873,24 @@ static void init_descriptors(void) bool retro_load_game(const struct retro_game_info* game) { + struct retro_system_av_info av_info; + if (!game) + return false; + CPU.Flags = 0; - init_descriptors(); - check_variables(); + init_descriptors(); + check_variables(); #ifdef LOAD_FROM_MEMORY_TEST if (!LoadROM(game)) #else - if (!LoadROM(game->path)) + if (!LoadROM(game->path)) #endif - return false; + return false; Settings.FrameTime = (Settings.PAL ? Settings.FrameTimePAL : - Settings.FrameTimeNTSC); + Settings.FrameTimeNTSC); - struct retro_system_av_info av_info; retro_get_system_av_info(&av_info); #ifdef USE_BLARGG_APU |