[Scummvm-cvs-logs] SF.net SVN: scummvm: [28394] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Aug 1 23:47:17 CEST 2007


Revision: 28394
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28394&view=rev
Author:   thebluegr
Date:     2007-08-01 14:47:17 -0700 (Wed, 01 Aug 2007)

Log Message:
-----------
IHNM and ITE: ScummVM will no longer crash when loading games from the command line

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp
    scummvm/trunk/engines/saga/script.cpp

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2007-08-01 20:59:59 UTC (rev 28393)
+++ scummvm/trunk/engines/saga/actor.cpp	2007-08-01 21:47:17 UTC (rev 28394)
@@ -897,7 +897,9 @@
 		}
 	}
 
-	assert(_protagonist);
+	// _protagonist can be null while loading a game from the command line
+	if (_protagonist == NULL)
+		return;
 
 	if ((actorsEntrance >= 0) && (_vm->_scene->_entryList.entryListCount > 0)) {
 		if (_vm->_scene->_entryList.entryListCount <= actorsEntrance) {

Modified: scummvm/trunk/engines/saga/script.cpp
===================================================================
--- scummvm/trunk/engines/saga/script.cpp	2007-08-01 20:59:59 UTC (rev 28393)
+++ scummvm/trunk/engines/saga/script.cpp	2007-08-01 21:47:17 UTC (rev 28394)
@@ -750,6 +750,10 @@
 	_leftButtonVerb = _currentVerb;
 	newRightButtonVerb = getVerbType(kVerbNone);
 
+	// _protagonist can be null while loading a game from the command line
+	if (_vm->_actor->_protagonist == NULL)
+		return;
+
 	if (_vm->_actor->_protagonist->_currentAction != kActionWalkDir) {
 		if (_vm->_scene->getHeight() >= mousePoint.y) {
 			newObjectId = _vm->_actor->hitTest(mousePoint, true);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list