From aa15d5fcd10301b1a7f1817df541e5658c7f90da Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 22 Jul 2010 18:14:43 +0000 Subject: 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 --- engines/sci/graphics/animate.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/sci/graphics/animate.cpp') 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) { -- cgit v1.2.3