diff --git a/src/core/serialize.c b/src/core/serialize.c index 2e352435c..c562d97e0 100644 --- a/src/core/serialize.c +++ b/src/core/serialize.c @@ -459,6 +459,9 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags) { else { bool success = _savePNGState(core, vf, &extdata); mStateExtdataDeinit(&extdata); + if (cheatVf) { + cheatVf->close(cheatVf); + } return success; } #endif