Commit 602b58ba authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

hhctl.ocx: Fix reference count leak in InPlace_OnPosRectChange.

Also compare the result of IOleObject_QueryInterface with S_OK instead of using not operator so it is more clear what the code is doing.
parent 24c5df3d
......@@ -365,8 +365,12 @@ static HRESULT STDMETHODCALLTYPE InPlace_OnPosRectChange(IOleInPlaceSite *iface,
ICOM_THIS_MULTI(IOleClientSiteImpl, lpvtblOleInPlaceSite, iface);
IOleInPlaceObject *inplace;
if (!IOleObject_QueryInterface(This->pBrowserObject, &IID_IOleInPlaceObject, (void **)&inplace))
if (IOleObject_QueryInterface(This->pBrowserObject, &IID_IOleInPlaceObject,
(void **)&inplace) == S_OK)
{
IOleInPlaceObject_SetObjectRects(inplace, lprcPosRect, lprcPosRect);
IOleInPlaceObject_Release(inplace);
}
return S_OK;
}
......
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