aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-07-22 18:14:43 +0000
committerFilippos Karapetis2010-07-22 18:14:43 +0000
commitaa15d5fcd10301b1a7f1817df541e5658c7f90da (patch)
tree25f0feb2f534e8ea1503a0357510d842b2971141
parent50c2fbbb487fac48cfa9e38ae698cb0be6e77cc6 (diff)
downloadscummvm-rg350-aa15d5fcd10301b1a7f1817df541e5658c7f90da.tar.gz
scummvm-rg350-aa15d5fcd10301b1a7f1817df541e5658c7f90da.tar.bz2
scummvm-rg350-aa15d5fcd10301b1a7f1817df541e5658c7f90da.zip
SCI: Remove sanity check introduced in rev 51154. When a node is deleted via kDeleteKey, the successor is set to NULL, thus list processing stops (which is what SSCI is doing).
svn-id: r51157
-rw-r--r--engines/sci/graphics/animate.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 229d38c777..f2aa4f9479 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -91,8 +91,6 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) {
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);
@@ -103,11 +101,9 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) {
// Lookup node again, since the nodetable it was in may have been reallocated.
// 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.
+ // If the node is deleted from kDeleteKey, it won't have a successor node, thus
+ // list processing will stop here (which is what SSCI does).
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) {