diff options
author | Matthew Hoops | 2011-04-01 22:52:12 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-04-01 22:52:12 -0400 |
commit | 211842c2fbb79d53ed62b8f88e44fd2290512bd5 (patch) | |
tree | 532bfa3ebcdf06d72b64156dbbe9fedd510fcc2b /engines/scumm | |
parent | 6247ed5b45803f79b0d6eab4b831964b05ba79ea (diff) | |
download | scummvm-rg350-211842c2fbb79d53ed62b8f88e44fd2290512bd5.tar.gz scummvm-rg350-211842c2fbb79d53ed62b8f88e44fd2290512bd5.tar.bz2 scummvm-rg350-211842c2fbb79d53ed62b8f88e44fd2290512bd5.zip |
SCUMM: Make sure finalize is called from o60_closeFile()
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/script_v60he.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 9d62a31f6d..7ecabd55e1 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -741,10 +741,14 @@ void ScummEngine_v60he::o60_openFile() { void ScummEngine_v60he::o60_closeFile() { int slot = pop(); if (0 <= slot && slot < 17) { - delete _hInFileTable[slot]; - delete _hOutFileTable[slot]; + if (_hOutFileTable[slot]) { + _hOutFileTable[slot]->finalize(); + delete _hOutFileTable[slot]; + _hOutFileTable[slot] = 0; + } + + delete _hInFileTable[slot]; _hInFileTable[slot] = 0; - _hOutFileTable[slot] = 0; } } |