From b5b4d3d99764724dce7f0ad7061c05e5ccbfcf76 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 15 Jun 2005 20:07:56 +0000 Subject: Don't access the thread after sfScriptGotoScene. As the comment points out, the thread has been destroyed. This fixes a crash when leaving the ferret guild lodge, and probably other places as well. svn-id: r18399 --- saga/sthread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'saga') diff --git a/saga/sthread.cpp b/saga/sthread.cpp index 19cbbdb91f..24815040d5 100644 --- a/saga/sthread.cpp +++ b/saga/sthread.cpp @@ -347,12 +347,12 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { (this->*scriptFunction)(thread, argumentsCount); - thread->_stackTopIndex = checkStackTopIndex; - if (scriptFunction == &Saga::Script::sfScriptGotoScene) { return true; // cause abortAllThreads called and _this_ thread destroyed } + thread->_stackTopIndex = checkStackTopIndex; + if (operandChar == opCcall) {// CALL function thread->push(thread->_returnValue); } -- cgit v1.2.3