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 a0169126cd
commit 437af22ab4
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Other fixes:
- Qt: Fix FPS target maxing out at 59.727 (fixes mgba.io/i/1421)
- Core: Fix crashes if core directories aren't set
- Qt: Cap audio buffer size to 8192 (fixes mgba.io/i/1433)
- Core: Fix crash when exiting game with cheats loaded
Misc:
- Qt: Make mute menu option also toggle fast-forward mute (fixes mgba.io/i/1424)

View File

@ -82,11 +82,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);
}