jscript: Move the clear_script_queue up to SCRIPTSTATE_INITIALIZED.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-02-20 21:26:41 +01:00 committed by Alexandre Julliard
parent 522340aeb3
commit 3c517f502b
1 changed files with 2 additions and 1 deletions

View File

@ -363,6 +363,8 @@ static void decrease_state(JScript *This, SCRIPTSTATE state)
return;
/* FALLTHROUGH */
case SCRIPTSTATE_INITIALIZED:
clear_script_queue(This);
if(This->ctx->host_global) {
IDispatch_Release(This->ctx->host_global);
This->ctx->host_global = NULL;
@ -402,7 +404,6 @@ static void decrease_state(JScript *This, SCRIPTSTATE state)
/* FALLTHROUGH */
case SCRIPTSTATE_UNINITIALIZED:
change_state(This, state);
clear_script_queue(This);
break;
default:
assert(0);