Libretro: Fix a crash if no core is loaded

This commit is contained in:
Jeffrey Pfau 2016-05-08 11:26:24 -07:00
parent 890b063ea5
commit e75b2928b1
1 changed files with 3 additions and 0 deletions

View File

@ -350,6 +350,9 @@ bool retro_load_game(const struct retro_game_info* game) {
}
void retro_unload_game(void) {
if (!core) {
return;
}
core->deinit(core);
mappedMemoryFree(data, dataSize);
data = 0;