oleaut32: Do not use static variable for disp params.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-09-14 20:12:13 +03:00 committed by Alexandre Julliard
parent e4451427d8
commit 2651677d49
1 changed files with 2 additions and 2 deletions

View File

@ -506,13 +506,13 @@ static inline HRESULT VARIANT_CoerceArray(VARIANTARG* pd, VARIANTARG* ps, VARTYP
static HRESULT VARIANT_FetchDispatchValue(LPVARIANT pvDispatch, LPVARIANT pValue)
{
DISPPARAMS params = { 0 };
HRESULT hres;
static DISPPARAMS emptyParams = { NULL, NULL, 0, 0 };
if ((V_VT(pvDispatch) & VT_TYPEMASK) == VT_DISPATCH) {
if (NULL == V_DISPATCH(pvDispatch)) return DISP_E_TYPEMISMATCH;
hres = IDispatch_Invoke(V_DISPATCH(pvDispatch), DISPID_VALUE, &IID_NULL,
LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &emptyParams, pValue,
LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &params, pValue,
NULL, NULL);
} else {
hres = DISP_E_TYPEMISMATCH;