Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- This is needed to pass the tests in next patch. dlls/vbscript/vbscript.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 27985bf..1df6a29 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -676,10 +676,10 @@ static HRESULT WINAPI VBScript_AddNamedItem(IActiveScript *iface, LPCOLESTR pstr return hres; } - if(This->ctx->host_global) - IDispatch_Release(This->ctx->host_global); - IDispatch_AddRef(disp); - This->ctx->host_global = disp; + if(!This->ctx->host_global) { + IDispatch_AddRef(disp); + This->ctx->host_global = disp; + } } item = heap_alloc(sizeof(*item)); -- 2.21.0