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.
This commit is contained in:
parent
24c5df3dc1
commit
602b58ba73
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue