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 a3b9988108
commit c0d0eb9dd0
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ Emulation fixes:
Other fixes:
- 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)
- Qt: Remove potentially deadlocking optimization
0.9.2: (2021-07-10)

View File

@ -871,7 +871,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) {