all repos — mgba @ aaf12cad27f3b90c68ac955b5ac0194f10b71682

mGBA Game Boy Advance Emulator

GBA Savedata: Only unmap savedata if present
Jeffrey Pfau jeffrey@endrift.com
Mon, 19 Sep 2016 13:52:11 -0700
commit

aaf12cad27f3b90c68ac955b5ac0194f10b71682

parent

573920cae492e56e19db412fecf29890ba53c421

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -42,6 +42,7 @@ - GBA Memory: Fix ldm {pc}

- GBA Video: Fix out-of-order OBJWIN - GBA: Count up timers should not count themselves - GBA Savedata: Fix savedata sync timer + - GBA Savedata: Only unmap savedata if present Misc: - 3DS: Use blip_add_delta_fast for a small speed improvement - OpenGL: Log shader compilation failure
M src/gba/savedata.csrc/gba/savedata.c

@@ -46,7 +46,9 @@

void GBASavedataDeinit(struct GBASavedata* savedata) { if (savedata->vf) { size_t size = GBASavedataSize(savedata); - savedata->vf->unmap(savedata->vf, savedata->data, size); + if (savedata->data) { + savedata->vf->unmap(savedata->vf, savedata->data, size); + } savedata->vf = NULL; } else { switch (savedata->type) {