Commit 0b48542f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Always set hostui to NULL in SetClientsite.

parent 355b3c19
......@@ -289,25 +289,26 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE
This->inplace = NULL;
}
if(This->doc_host.hostui)
if(This->doc_host.hostui) {
IDocHostUIHandler_Release(This->doc_host.hostui);
This->doc_host.hostui = NULL;
}
if(This->client)
IOleClientSite_Release(This->client);
This->client = pClientSite;
if(!pClientSite) {
if(This->doc_host.document)
deactivate_document(&This->doc_host);
This->client = NULL;
return S_OK;
}
This->client = pClientSite;
IOleClientSite_AddRef(pClientSite);
hres = IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler,
(void**)&This->doc_host.hostui);
if(FAILED(hres))
This->doc_host.hostui = NULL;
IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler,
(void**)&This->doc_host.hostui);
hres = IOleClientSite_GetContainer(This->client, &container);
if(SUCCEEDED(hres)) {
......
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