From eb885a750f0677cb2d50f4969862065962471431 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 24 Jul 2006 11:45:30 +0100 Subject: [PATCH] oleaut32: Initialize pRetVal in ITypeInfo::Invoke before calling VariantCopyInd as native doesn't assume that it doesn't contain valid data. --- dlls/oleaut32/typelib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 52aae920736..3ba1b4e2067 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5391,8 +5391,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( } if (pVarResult) + { + VariantInit(pVarResult); /* deref return value */ hres = VariantCopyInd(pVarResult, prgpvarg[i]); + } /* free data stored in varresult. Note that * VariantClear doesn't do what we want because we are -- 2.11.4.GIT