jscript: Make sure retv pointer is initialised in exec_source even if no value needs to be returned.
This commit is contained in:
parent
1f168cbd6e
commit
7db81aeb67
|
@ -493,8 +493,12 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
|
||||||
|
|
||||||
if(retv && (exec_type == EXECT_EVAL || rt.type == RT_RETURN))
|
if(retv && (exec_type == EXECT_EVAL || rt.type == RT_RETURN))
|
||||||
*retv = val;
|
*retv = val;
|
||||||
else
|
else {
|
||||||
|
if (retv) {
|
||||||
|
VariantInit(retv);
|
||||||
|
}
|
||||||
VariantClear(&val);
|
VariantClear(&val);
|
||||||
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue