aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/animate.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 67c41ee9ba..7550e855bf 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -99,8 +99,11 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) {
// Lookup node again, since the nodetable it was in may have been reallocated
curNode = _s->_segMan->lookupNode(curAddress);
}
- curAddress = curNode->succ;
- curNode = _s->_segMan->lookupNode(curAddress);
+
+ if (curNode) {
+ curAddress = curNode->succ;
+ curNode = _s->_segMan->lookupNode(curAddress);
+ }
}
return true;
}