mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
SCI: Added a sanity check for rev 51152. If a node has been deleted, it shouldn't have a successor node
svn-id: r51154
This commit is contained in:
parent
b4a704c342
commit
91e909a25c
@ -91,6 +91,8 @@ 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);
|
||||
|
||||
@ -102,6 +104,10 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) {
|
||||
// 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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user