GBA Savedata: Only unmap savedata if present
Jeffrey Pfau jeffrey@endrift.com
Mon, 19 Sep 2016 13:52:11 -0700
2 files changed,
4 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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) {