mshtml: Better handling of IDocHostUIHandler in SetClientSite.
This commit is contained in:
parent
068cedc7f2
commit
d44364d3fe
|
@ -73,17 +73,19 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
if(pClientSite == This->client)
|
if(pClientSite == This->client)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
if(This->client)
|
if(This->client) {
|
||||||
IOleClientSite_Release(This->client);
|
IOleClientSite_Release(This->client);
|
||||||
|
|
||||||
if(This->hostui)
|
|
||||||
IDocHostUIHandler_Release(This->hostui);
|
|
||||||
|
|
||||||
if(!pClientSite) {
|
|
||||||
This->client = NULL;
|
This->client = NULL;
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(This->hostui) {
|
||||||
|
IDocHostUIHandler_Release(This->hostui);
|
||||||
|
This->hostui = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!pClientSite)
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
hres = IOleObject_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&pDocHostUIHandler);
|
hres = IOleObject_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&pDocHostUIHandler);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
DOCHOSTUIINFO hostinfo;
|
DOCHOSTUIINFO hostinfo;
|
||||||
|
@ -120,6 +122,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
}
|
}
|
||||||
CoTaskMemFree(override_key_path);
|
CoTaskMemFree(override_key_path);
|
||||||
}
|
}
|
||||||
|
IDocHostUIHandler2_Release(pDocHostUIHandler2);
|
||||||
}
|
}
|
||||||
|
|
||||||
This->has_key_path = TRUE;
|
This->has_key_path = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue