On 11/7/19 2:28 PM, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
This is needed for the next patch to work properly, else it will crash when script is re-initialized.
dlls/vbscript/vbscript.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 938e517..3848f9a 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -419,6 +419,9 @@ static HRESULT WINAPI VBScript_SetScriptSite(IActiveScript *iface, IActiveScript if(InterlockedCompareExchange(&This->thread_id, GetCurrentThreadId(), 0)) return E_UNEXPECTED;
- if(!This->ctx->global_obj && FAILED(hres = init_global(This->ctx)))
return hres;
We could just keep existing global object alive as long context is alive. With the patch I just sent, this should not be needed.
Jacek