Module: wine Branch: master Commit: 8c2b4bfe4899faa7f8438767ccacb13855ff17f0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c2b4bfe4899faa7f8438767cc...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Feb 9 17:51:41 2014 +0400
oleaut32: Initialize result VARIANT in *FromDisp().
---
dlls/oleaut32/tests/vartype.c | 1 + dlls/oleaut32/vartype.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 6c45144..61ad45e 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -604,6 +604,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(IDispatch *iface, ok(params->cNamedArgs == 0, "got %d\n", params->cNamedArgs);
ok(res != NULL, "got %p\n", res); + ok(V_VT(res) == VT_EMPTY, "got %d\n", V_VT(res)); ok(ei == NULL, "got %p\n", ei); ok(arg_err == NULL, "got %p\n", arg_err);
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 672fbcb..43902c5 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -122,6 +122,7 @@ static HRESULT VARIANT_FromDisp(IDispatch* pdispIn, LCID lcid, void* pOut, return DISP_E_BADVARTYPE;
/* Get the default 'value' property from the IDispatch */ + VariantInit(&srcVar); hRet = IDispatch_Invoke(pdispIn, DISPID_VALUE, &IID_NULL, lcid, DISPATCH_PROPERTYGET, &emptyParams, &srcVar, NULL, NULL);