jscript: Make sure retv pointer is initialised in exec_source even if no value needs to be returned.

This commit is contained in:
Rob Shearman 2009-12-30 17:33:48 +00:00 committed by Alexandre Julliard
parent 1f168cbd6e
commit 7db81aeb67
1 changed files with 5 additions and 1 deletions

View File

@ -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))
*retv = val;
else
else {
if (retv) {
VariantInit(retv);
}
VariantClear(&val);
}
return S_OK;
}