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