From 7b2792328153024ef8ffd23050393ddb3098f6b0 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 13 May 2011 23:01:02 +0200 Subject: SCI: Avoid incrementing lockers of deleted script Having a deleted script with non-zero lockers had the side effect of making the deleted script re-appear in the GC's work list, including any (deleted) objects in the script. This should be the root cause of bugs #3299458 and #3295849, so also delete the workaround added for that in be5d448d. (cherry picked from commit c01fed7159c313680e55458efb6529d332ebc8b0) --- engines/sci/engine/script.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/sci/engine/script.cpp') diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 25bf91c3ad..0592940559 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -383,6 +383,7 @@ void Script::relocateSci3(reg_t block) { } void Script::incrementLockers() { + assert(!_markedAsDeleted); _lockers++; } @@ -396,6 +397,7 @@ int Script::getLockers() const { } void Script::setLockers(int lockers) { + assert(lockers == 0 || !_markedAsDeleted); _lockers = lockers; } -- cgit v1.2.3