diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index d470de735fd..79fe164b5d4 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4338,7 +4338,8 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType( HREFTYPE *pRefType) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - int(i); + int i; + HRESULT hr = S_OK; TLBImplType *pImpl = This->impltypelist; TRACE("(%p) index %d\n", This, index); @@ -4358,8 +4359,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType( } else { - if (!pImpl) return TYPE_E_ELEMENTNOTFOUND; - *pRefType = pImpl->hRef; + hr = TYPE_E_ELEMENTNOTFOUND; } } else @@ -4370,15 +4370,21 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType( pImpl = pImpl->next; } - if (!pImpl) return TYPE_E_ELEMENTNOTFOUND; - - *pRefType = pImpl->hRef; - - TRACE("-- 0x%08lx\n", pImpl->hRef ); + if (pImpl) + *pRefType = pImpl->hRef; + else + hr = TYPE_E_ELEMENTNOTFOUND; } - return S_OK; + if(TRACE_ON(ole)) + { + if(SUCCEEDED(hr)) + TRACE("SUCCESS -- hRef = 0x%08lx\n", *pRefType ); + else + TRACE("FAILURE -- hresult = 0x%08lx\n", hr); + } + return hr; } /* ITypeInfo::GetImplTypeFlags