[Scummvm-cvs-logs] SF.net SVN: scummvm:[51154] scummvm/trunk/engines/sci/graphics/animate.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jul 22 19:53:34 CEST 2010


Revision: 51154
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51154&view=rev
Author:   thebluegr
Date:     2010-07-22 17:53:32 +0000 (Thu, 22 Jul 2010)

Log Message:
-----------
SCI: Added a sanity check for rev 51152. If a node has been deleted, it shouldn't have a successor node

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=51152&view=rev

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/animate.cpp

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-07-22 17:41:42 UTC (rev 51153)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-07-22 17:53:32 UTC (rev 51154)
@@ -91,6 +91,8 @@
 
 		signal = readSelectorValue(_s->_segMan, curObject, SELECTOR(signal));
 		if (!(signal & kSignalFrozen)) {
+			reg_t nextNode = curNode->succ;
+
 			// Call .doit method of that object
 			invokeSelector(_s, curObject, SELECTOR(doit), argc, argv, 0);
 
@@ -102,6 +104,10 @@
 			// The node might have been deallocated at this point (e.g. LSL2, room 42),
 			// in which case the node reference will be null and the loop will stop below.
 			curNode = _s->_segMan->lookupNode(curAddress, false);
+			
+			// Sanity check: If the node has been deleted, it shouldn't have a successor node
+			if (!curNode && !nextNode.isNull())
+				error("kAnimate: list node has been deleted, but it has a successor node");
 		}
 
 		if (curNode) {


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