Core: Fix crash when exiting game with cheats loaded

This commit is contained in:
Vicki Pfau 2019-06-22 13:03:53 -07:00
parent 3f044a5791
commit f3ec9db9d7
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ Other fixes:
- Core: Fix crashes if core directories aren't set - Core: Fix crashes if core directories aren't set
- Qt: Fix menu bar staying hidden in full screen (fixes mgba.io/i/317) - Qt: Fix menu bar staying hidden in full screen (fixes mgba.io/i/317)
- GB SIO: Fix lockstep failing games aren't reloaded - GB SIO: Fix lockstep failing games aren't reloaded
- Core: Fix crash when exiting game with cheats loaded
Misc: Misc:
- GBA Savedata: EEPROM performance fixes - GBA Savedata: EEPROM performance fixes
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash

View File

@ -83,11 +83,11 @@ void mCheatSetInit(struct mCheatSet* set, const char* name) {
} }
void mCheatSetDeinit(struct mCheatSet* set) { void mCheatSetDeinit(struct mCheatSet* set) {
mCheatListDeinit(&set->list);
size_t i; size_t i;
for (i = 0; i < StringListSize(&set->lines); ++i) { for (i = 0; i < StringListSize(&set->lines); ++i) {
free(*StringListGetPointer(&set->lines, i)); free(*StringListGetPointer(&set->lines, i));
} }
mCheatListDeinit(&set->list);
if (set->name) { if (set->name) {
free(set->name); free(set->name);
} }