aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_saveload.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2010-11-22 18:07:33 +0000
committerMatthew Hoops2010-11-22 18:07:33 +0000
commitcb843daec0e87747350c4432d9c4111b894c04b5 (patch)
tree22f10d70588674c497d5c96b75226d4c9ec7705e /engines/mohawk/riven_saveload.cpp
parent9d4827b5e1b56b5922aeced5a1d80cbfeaeb1405 (diff)
downloadscummvm-rg350-cb843daec0e87747350c4432d9c4111b894c04b5.tar.gz
scummvm-rg350-cb843daec0e87747350c4432d9c4111b894c04b5.tar.bz2
scummvm-rg350-cb843daec0e87747350c4432d9c4111b894c04b5.zip
MOHAWK: Have MohawkResource::open() return a bool for success/failure
svn-id: r54418
Diffstat (limited to 'engines/mohawk/riven_saveload.cpp')
-rw-r--r--engines/mohawk/riven_saveload.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index 40062ad27a..881e171b84 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -102,7 +102,12 @@ bool RivenSaveLoad::loadGame(Common::String filename) {
debug(0, "Loading game from \'%s\'", filename.c_str());
MohawkArchive *mhk = new MohawkArchive();
- mhk->open(loadFile);
+
+ if (!mhk->open(loadFile)) {
+ warning("Save file is not a Mohawk archive");
+ delete mhk;
+ return false;
+ }
// First, let's make sure we're using a saved game file from this version of Riven by checking the VERS resource
Common::SeekableReadStream *vers = mhk->getResource(ID_VERS, 1);