aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v72he.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-05-11 21:32:58 +0000
committerEugene Sandulenko2005-05-11 21:32:58 +0000
commit3f2b92f3f27c32f5846ded7dcd9ad0bfa31fc187 (patch)
treec353bb79ca5f141c4a85457a7f237e0fc242cd64 /scumm/script_v72he.cpp
parent65ba4df9bcaf105c2c873cfd2721d19d12aaba5f (diff)
downloadscummvm-rg350-3f2b92f3f27c32f5846ded7dcd9ad0bfa31fc187.tar.gz
scummvm-rg350-3f2b92f3f27c32f5846ded7dcd9ad0bfa31fc187.tar.bz2
scummvm-rg350-3f2b92f3f27c32f5846ded7dcd9ad0bfa31fc187.zip
Fix crash in puttsfunshop when trying to edit new shape.
svn-id: r18063
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r--scumm/script_v72he.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 55b371fdc6..208ca0cb0b 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1778,7 +1778,8 @@ int ScummEngine_v72he::readFileToArray(int slot, int32 size) {
writeVar(0, 0);
ArrayHeader *ah = defineArray(0, kByteArray, 0, 0, 0, size);
- _hFileTable[slot].read(ah->data, size + 1);
+ if (_hFileTable[slot].isOpen())
+ _hFileTable[slot].read(ah->data, size + 1);
return readVar(0);
}