Commit d44364d3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Better handling of IDocHostUIHandler in SetClientSite.

parent 068cedc7
......@@ -73,16 +73,18 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
if(pClientSite == This->client)
return S_OK;
if(This->client)
if(This->client) {
IOleClientSite_Release(This->client);
This->client = NULL;
}
if(This->hostui)
if(This->hostui) {
IDocHostUIHandler_Release(This->hostui);
This->hostui = NULL;
}
if(!pClientSite) {
This->client = NULL;
if(!pClientSite)
return S_OK;
}
hres = IOleObject_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&pDocHostUIHandler);
if(SUCCEEDED(hres)) {
......@@ -120,6 +122,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
CoTaskMemFree(override_key_path);
}
IDocHostUIHandler2_Release(pDocHostUIHandler2);
}
This->has_key_path = TRUE;
......
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