3 Apr
2025
3 Apr
'25
6:53 p.m.
Jacek Caban (@jacek) commented about dlls/jscript/function.c:
if(SUCCEEDED(hres)) { V_VT(&ret) = VT_EMPTY; - hres = IWineJSDispatchHost_Construct(function->host_iface, ctx->lcid, flags, &dp, &ret, &ei, - &ctx->jscaller->IServiceProvider_iface); + hres = IWineJSDispatchHost_Construct(function->host_iface, ctx->lcid, flags, &dp, r ? &ret : NULL, + &ei, &ctx->jscaller->IServiceProvider_iface);
It doesn't seem right to pass NULL constructor result, I think we should fix error handling instead and always clear the variant on success. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7737#note_99903