Commit 0eeb5c17 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use jsstr_flush in jsval_to_variant.

parent 721d3ec1
......@@ -354,8 +354,10 @@ HRESULT jsval_to_variant(jsval_t val, VARIANT *retv)
if(str->length_flags & JSSTR_FLAG_NULLBSTR) {
V_BSTR(retv) = NULL;
}else {
V_BSTR(retv) = SysAllocStringLen(str->str, jsstr_length(str));
if(!V_BSTR(retv))
V_BSTR(retv) = SysAllocStringLen(NULL, jsstr_length(str));
if(V_BSTR(retv))
jsstr_flush(str, V_BSTR(retv));
else
return E_OUTOFMEMORY;
}
return S_OK;
......
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