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
- Qt: Fix menu bar staying hidden in full screen (fixes mgba.io/i/317)
- GB SIO: Fix lockstep failing games aren't reloaded
- Core: Fix crash when exiting game with cheats loaded
Misc:
- GBA Savedata: EEPROM performance fixes
- 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) {
mCheatListDeinit(&set->list);
size_t i;
for (i = 0; i < StringListSize(&set->lines); ++i) {
free(*StringListGetPointer(&set->lines, i));
}
mCheatListDeinit(&set->list);
if (set->name) {
free(set->name);
}