diff --git a/CHANGES b/CHANGES index 13109f5fe..0b83173ea 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/src/platform/libretro/libretro.c b/src/platform/libretro/libretro.c index aad9fba7e..25c465dbc 100644 --- a/src/platform/libretro/libretro.c +++ b/src/platform/libretro/libretro.c @@ -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) {