Commit 582e2f1f authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

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).
parent cca69647
......@@ -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);
}
/************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment