diff options
-rw-r--r-- | engines/scumm/object.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 8bcd92fd3b..eaffbd04bb 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -109,6 +109,13 @@ void ScummEngine::setOwnerOf(int obj, int owner) { int arg = (_game.version >= 6) ? obj : 0; + // WORKAROUND for bug #1917981: Game crash when finishing Indy3 demo. + // Script 94 tries to empty the inventory but does so in a bogus way. + // This causes it to try to remove object 0 from the inventory. + if (_game.id == GID_PASS && obj == 0 && vm.slot[_currentScript].number == 94) + return; + assert(obj > 0); + if (owner == 0) { clearOwnerOf(obj); |