aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he
diff options
context:
space:
mode:
authorTravis Howell2007-09-21 01:20:22 +0000
committerTravis Howell2007-09-21 01:20:22 +0000
commit22c009ee457705277104fac5f4d267e640434b98 (patch)
treeec2af8421e077485fca4b2cba49fd0dc593c9ba9 /engines/scumm/he
parent4436433cf676c1c1b8b1f0e0f482a2a32bebefc0 (diff)
downloadscummvm-rg350-22c009ee457705277104fac5f4d267e640434b98.tar.gz
scummvm-rg350-22c009ee457705277104fac5f4d267e640434b98.tar.bz2
scummvm-rg350-22c009ee457705277104fac5f4d267e640434b98.zip
Fix regression, when loading levels in mustard.
svn-id: r28997
Diffstat (limited to 'engines/scumm/he')
-rw-r--r--engines/scumm/he/script_v80he.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp
index d4a11240bd..be17bbe3df 100644
--- a/engines/scumm/he/script_v80he.cpp
+++ b/engines/scumm/he/script_v80he.cpp
@@ -410,16 +410,18 @@ void ScummEngine_v80he::o80_getFileSize() {
if (!f) {
Common::File *file = new Common::File();
file->open((const char *)filename, Common::File::kFileReadMode);
- f = file;
+ if (!file->isOpen())
+ delete f;
+ else
+ f = file;
}
if (!f) {
push(-1);
} else {
push(f->size());
+ delete f;
}
-
- delete f;
}
void ScummEngine_v80he::o80_stringToInt() {