mirror of https://github.com/mgba-emu/mgba.git
Fix assumption that savedata->vf is non-null within flash memory code
This commit is contained in:
parent
d87081e6bc
commit
2bca4c399b
|
@ -343,7 +343,9 @@ void _flashSwitchBank(struct GBASavedata* savedata, int bank) {
|
|||
savedata->currentBank = &savedata->data[bank << 16];
|
||||
if (bank > 0) {
|
||||
savedata->type = SAVEDATA_FLASH1M;
|
||||
savedata->vf->truncate(savedata->vf, SIZE_CART_FLASH1M);
|
||||
if (savedata->vf) {
|
||||
savedata->vf->truncate(savedata->vf, SIZE_CART_FLASH1M);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue