From 5a5c51bb489d9b88bc3477dfda5af533e37b19a7 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 26 Feb 2009 23:13:00 +0000 Subject: Reset successor variable after use. This fixes a crash in SQ3 after reloading followed by restarting. svn-id: r38918 --- engines/sci/engine/vm.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sci') diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 30c7b1462e..d6f1afc45d 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -2023,6 +2023,7 @@ static EngineState *_game_run(EngineState *s, int restoring) { s->execution_stack_pos_changed = 0; run_vm(s, (successor || restoring) ? 1 : 0); if (s->restarting_flags & SCI_GAME_IS_RESTARTING_NOW) { // Restart was requested? + successor = NULL; free(s->execution_stack); s->execution_stack = NULL; s->execution_stack_pos = -1; -- cgit v1.2.3