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:
parent
cca69647a3
commit
582e2f1ff8
|
@ -838,10 +838,9 @@ static HRESULT WINAPI DefaultHandler_EnumAdvise(
|
|||
*ppenumAdvise = NULL;
|
||||
|
||||
if (!This->oleAdviseHolder)
|
||||
return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder,
|
||||
ppenumAdvise);
|
||||
|
||||
return S_OK;
|
||||
|
||||
return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder, ppenumAdvise);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
|
Loading…
Reference in New Issue