msscript.ocx: Fail if the module array failed to allocate.

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-06-24 17:16:47 +03:00 committed by Alexandre Julliard
parent f81862d415
commit b34cd24f7d
1 changed files with 3 additions and 0 deletions

View File

@ -1202,6 +1202,9 @@ static HRESULT WINAPI ScriptControl_put_Language(IScriptControl *iface, BSTR lan
hres = E_OUTOFMEMORY;
}
}
else
hres = E_OUTOFMEMORY;
if (FAILED(hres)) {
detach_script_host(This->host);
This->host = NULL;