From aedc77f0bddcfcd11e465ee29c5fc66973ef9f9b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 25 Jun 2010 17:25:00 +0000 Subject: When loading a game, stop all running VMs recursively, and also stop kAnimate's current recursion. This fixes the invalid execution stack frame in SQ1, when loading from the death screen after dying from the acid drops in Kerona. This should also fix the invalid hunk pointers, thus the warning about invalid hunk pointers has been turned into an error, as it shouldn't occur anymore svn-id: r50277 --- engines/sci/graphics/animate.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/sci/graphics/animate.cpp') diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 9018a6f62e..08ff3bfc80 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -98,6 +98,11 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) { if (!(signal & kSignalFrozen)) { // Call .doit method of that object invokeSelector(_s, curObject, SELECTOR(doit), argc, argv, 0); + + // If a game is being loaded, stop processing + 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); } -- cgit v1.2.3