[Scummvm-cvs-logs] scummvm master -> afdfff02f1415f66856f273fcf9f30d7621d8953
eriktorbjorn
eriktorbjorn at telia.com
Wed Jun 22 22:04:33 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
afdfff02f1 TSAGE: Don't crash if -x option points to an non-existing savegame.
Commit: afdfff02f1415f66856f273fcf9f30d7621d8953
https://github.com/scummvm/scummvm/commit/afdfff02f1415f66856f273fcf9f30d7621d8953
Author: eriktorbjorn (eriktorbjorn at users.sourceforge.net)
Date: 2011-06-22T13:00:59-07:00
Commit Message:
TSAGE: Don't crash if -x option points to an non-existing savegame.
Instead, just pretend there is no spoon^H^H^H^H^H-x option.
Changed paths:
engines/tsage/ringworld_logic.cpp
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 1dd905b..5850117 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -1333,9 +1333,20 @@ void RingworldGame::start() {
RING_INVENTORY._scanner._sceneNumber = 1;
RING_INVENTORY._ring._sceneNumber = 1;
+ int slot = -1;
+
+ if (ConfMan.hasKey("save_slot")) {
+ slot = ConfMan.getInt("save_slot");
+ Common::String file = _vm->generateSaveName(slot);
+ Common::InSaveFile *in = _vm->_system->getSavefileManager()->openForLoading(file);
+ if (in)
+ delete in;
+ else
+ slot = -1;
+ }
- if (ConfMan.hasKey("save_slot"))
- _globals->_sceneHandler._loadGameSlot = ConfMan.getInt("save_slot");
+ if (slot >= 0)
+ _globals->_sceneHandler._loadGameSlot = slot;
else
// Switch to the title screen
_globals->_sceneManager.setNewScene(1000);
More information about the Scummvm-git-logs
mailing list