diff options
author | Matthew Hoops | 2010-11-22 18:07:33 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-11-22 18:07:33 +0000 |
commit | cb843daec0e87747350c4432d9c4111b894c04b5 (patch) | |
tree | 22f10d70588674c497d5c96b75226d4c9ec7705e /engines/mohawk/riven_saveload.cpp | |
parent | 9d4827b5e1b56b5922aeced5a1d80cbfeaeb1405 (diff) | |
download | scummvm-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.cpp | 7 |
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); |