Deal with pExcepInfo == NULL.

This commit is contained in:
Huw Davies 2005-10-31 15:43:53 +00:00 committed by Alexandre Julliard
parent 7cd5467377
commit 0fb5729693
1 changed files with 9 additions and 0 deletions

View File

@ -537,6 +537,7 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
VARIANTARG* rgVarRef = NULL;
UINT u, cVarRef;
UINT uArgErr;
EXCEPINFO ExcepInfo;
TRACE("(%p)->(%ld,%s,%lx,%x,%p,%p,%p,%p)\n", This,
dispIdMember, debugstr_guid(riid),
@ -546,6 +547,7 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
/* [out] args can't be null, use dummy vars if needed */
if (!pVarResult) pVarResult = &VarResult;
if (!puArgErr) puArgErr = &uArgErr;
if (!pExcepInfo) pExcepInfo = &ExcepInfo;
/* count by-ref args */
for (cVarRef=0,u=0; u<pDispParams->cArgs; u++) {
@ -596,6 +598,13 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
CoTaskMemFree(rgVarRef);
CoTaskMemFree(rgVarRefIdx);
}
if(pExcepInfo == &ExcepInfo)
{
SysFreeString(pExcepInfo->bstrSource);
SysFreeString(pExcepInfo->bstrDescription);
SysFreeString(pExcepInfo->bstrHelpFile);
}
return hr;
}