aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-03-22 19:12:49 -0400
committerMatthew Hoops2011-03-22 19:54:58 -0400
commitf40b74d496f53c2864ab9573b175498a978d0e0e (patch)
tree17f75c47f6a30a95fd8c76f68f58341e2d886e36 /engines
parent8982fff1b79aa3cc53a5c328b283e0f102cb647f (diff)
downloadscummvm-rg350-f40b74d496f53c2864ab9573b175498a978d0e0e.tar.gz
scummvm-rg350-f40b74d496f53c2864ab9573b175498a978d0e0e.tar.bz2
scummvm-rg350-f40b74d496f53c2864ab9573b175498a978d0e0e.zip
MOHAWK: Handle launcher load fails more gracefully
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/riven.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 1d47d453a0..6393206d1e 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -171,7 +171,12 @@ Common::Error MohawkEngine_Riven::run() {
Common::StringArray savedGamesList = _saveLoad->generateSaveGameList();
if (gameToLoad > savedGamesList.size())
error ("Could not find saved game");
- _saveLoad->loadGame(savedGamesList[gameToLoad]);
+
+ // Attempt to load the game. On failure, just send us to the main menu.
+ if (!_saveLoad->loadGame(savedGamesList[gameToLoad])) {
+ changeToStack(aspit);
+ changeToCard(1);
+ }
} else {
// Otherwise, start us off at aspit's card 1 (the main menu)
changeToStack(aspit);