diff options
author | Filippos Karapetis | 2010-07-22 17:25:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-22 17:25:21 +0000 |
commit | 634d959897695bda9371411ebb9ffda9a09f18d9 (patch) | |
tree | dd9a3349610053ae9d19fbdd6c52c16b5bf2093b /engines/sci/graphics | |
parent | 756ab24f3203837f1101b995c90d1ebbdb4e54b2 (diff) | |
download | scummvm-rg350-634d959897695bda9371411ebb9ffda9a09f18d9.tar.gz scummvm-rg350-634d959897695bda9371411ebb9ffda9a09f18d9.tar.bz2 scummvm-rg350-634d959897695bda9371411ebb9ffda9a09f18d9.zip |
SCI: Fixed the crash in LSL2, room 42 (when arriving at the island). kAnimate may refer to unfrozen objects which have been deleted, thus handle that case accordingly.
svn-id: r51152
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 6fb427500d..d95125e0a8 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -98,8 +98,10 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) { if (_s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit()) return true; // Stop processing - // Lookup node again, since the nodetable it was in may have been reallocated - curNode = _s->_segMan->lookupNode(curAddress); + // 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. + curNode = _s->_segMan->lookupNode(curAddress, false); } if (curNode) { |