Reset successor variable after use.

This fixes a crash in SQ3 after reloading followed by restarting.

svn-id: r38918
This commit is contained in:
Willem Jan Palenstijn 2009-02-26 23:13:00 +00:00
parent c1fb06c162
commit 5a5c51bb48

View File

@ -2023,6 +2023,7 @@ static EngineState *_game_run(EngineState *s, int restoring) {
s->execution_stack_pos_changed = 0; s->execution_stack_pos_changed = 0;
run_vm(s, (successor || restoring) ? 1 : 0); run_vm(s, (successor || restoring) ? 1 : 0);
if (s->restarting_flags & SCI_GAME_IS_RESTARTING_NOW) { // Restart was requested? if (s->restarting_flags & SCI_GAME_IS_RESTARTING_NOW) { // Restart was requested?
successor = NULL;
free(s->execution_stack); free(s->execution_stack);
s->execution_stack = NULL; s->execution_stack = NULL;
s->execution_stack_pos = -1; s->execution_stack_pos = -1;