Libretro: Fix crash when using Game Boy codes (fixes #2281)

This commit is contained in:
Vicki Pfau 2021-08-17 16:16:23 -07:00
parent 2fec366076
commit 9355def316
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Other fixes:
- Core: Don't attempt to restore rewind diffs past start of rewind
- GB Video: Fix memory leak when reseting SGB games
- GBA: Fix out of bounds ROM accesses on patched ROMs smaller than 32 MiB
- Libretro: Fix crash when using Game Boy codes (fixes mgba.io/i/2281)
Misc:
- Core: Suspend runloop when a core crashes
- Qt: Rearrange menus some

View File

@ -942,7 +942,9 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code) {
}
}
#endif
cheatSet->refresh(cheatSet, device);
if (cheatSet->refresh) {
cheatSet->refresh(cheatSet, device);
}
}
unsigned retro_get_region(void) {