Commit 755eac8f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Properly handle NULL pvarResult in ParseScriptText.

parent e22458c2
......@@ -783,7 +783,8 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface,
clear_ei(This->ctx);
hres = exec_source(exec_ctx, code, &code->global_code, TRUE, &r);
if(SUCCEEDED(hres)) {
hres = jsval_to_variant(r, pvarResult);
if(pvarResult)
hres = jsval_to_variant(r, pvarResult);
jsval_release(r);
}
exec_release(exec_ctx);
......
......@@ -1945,6 +1945,13 @@ static void test_script_exprs(void)
hres = parse_script_expr("reportSuccess(); return true", &v);
ok(hres == 0x800a03fa, "parse_script_expr failed: %08x\n", hres);
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
hres = parse_script_expr("reportSuccess(); true", NULL);
ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres);
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
testing_expr = FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment