mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix freeing the right things when unloading a ROM
This commit is contained in:
parent
ef93f68658
commit
4388e36ddc
|
@ -100,7 +100,10 @@ void GBAUnloadROM(struct GBA* gba) {
|
|||
if (gba->pristineRom == gba->memory.rom) {
|
||||
gba->memory.rom = 0;
|
||||
} else {
|
||||
mappedMemoryFree(gba->pristineRom, gba->pristineRomSize);
|
||||
if (gba->yankedRomSize) {
|
||||
gba->yankedRomSize = 0;
|
||||
}
|
||||
mappedMemoryFree(gba->memory.rom, SIZE_CART0);
|
||||
}
|
||||
|
||||
if (gba->romVf) {
|
||||
|
|
Loading…
Reference in New Issue