ole32: Fix DefaultHandler_EnumAdvises.

As per MSDN, if the object has no connections then
IOleObject::EnumAdvises should return a NULL enumerator and S_OK. This
is the case when This->oleAdviseHolder is NULL, so do this and avert a
potential NULL dereference of This->oleAdviseHolder (found by
Coverity).
This commit is contained in:
Robert Shearman 2006-04-07 11:18:05 +01:00 committed by Alexandre Julliard
parent cca69647a3
commit 582e2f1ff8
1 changed files with 2 additions and 3 deletions

View File

@ -838,10 +838,9 @@ static HRESULT WINAPI DefaultHandler_EnumAdvise(
*ppenumAdvise = NULL;
if (!This->oleAdviseHolder)
return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder,
ppenumAdvise);
return S_OK;
return S_OK;
return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder, ppenumAdvise);
}
/************************************************************************