From 3f2b92f3f27c32f5846ded7dcd9ad0bfa31fc187 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 11 May 2005 21:32:58 +0000 Subject: Fix crash in puttsfunshop when trying to edit new shape. svn-id: r18063 --- scumm/script_v72he.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3