[PATCH] jscript/tests: Test for script object creation failure (Coverity)
Nikolay Sivov
nsivov at codeweavers.com
Mon Jan 8 08:57:22 CST 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/jscript/tests/run.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c
index bd5e341545..887b264d8f 100644
--- a/dlls/jscript/tests/run.c
+++ b/dlls/jscript/tests/run.c
@@ -2147,6 +2147,8 @@ static HRESULT parse_script_expr(const char *expr, VARIANT *res, IActiveScript *
HRESULT hres;
engine = create_script();
+ if(!engine)
+ return E_FAIL;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
@@ -2191,6 +2193,8 @@ static void test_retval(void)
HRESULT hres;
engine = create_script();
+ if(!engine)
+ return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
--
2.15.1
More information about the wine-devel
mailing list