From f40b74d496f53c2864ab9573b175498a978d0e0e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 22 Mar 2011 19:12:49 -0400 Subject: MOHAWK: Handle launcher load fails more gracefully --- engines/mohawk/riven.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines') 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); -- cgit v1.2.3