GBA Savedata: Only unmap savedata if present

This commit is contained in:
Jeffrey Pfau 2016-09-19 13:52:11 -07:00
parent 573920cae4
commit aaf12cad27
2 changed files with 4 additions and 1 deletions

View File

@ -42,6 +42,7 @@ Bugfixes:
- 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

View File

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