mirror of
https://github.com/libretro/mgba.git
synced 2025-02-18 23:00:39 +00:00
Core: Fix crash if cheat autosave fails
This commit is contained in:
parent
d30d892452
commit
199e3ef4ad
@ -260,6 +260,9 @@ void mCheatAutosave(struct mCheatDevice* device) {
|
||||
return;
|
||||
}
|
||||
struct VFile* vf = mDirectorySetOpenSuffix(&device->p->dirs, device->p->dirs.cheats, ".cheats", O_WRONLY | O_CREAT | O_TRUNC);
|
||||
if (!vf) {
|
||||
return;
|
||||
}
|
||||
mCheatSaveFile(device, vf);
|
||||
vf->close(vf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user