From 52bade97f46e99331800a4fbe5f4a80300d196d1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 7 Aug 2009 19:02:31 +0200 Subject: [PATCH] shdocvw: Check GetContainer result before setting new container. --- dlls/shdocvw/oleobject.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 017e738e1ad..c42aa9137b0 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -152,8 +152,16 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site) SWP_NOZORDER | SWP_SHOWWINDOW); if(This->client) { + IOleContainer *container; + IOleClientSite_ShowObject(This->client); - IOleClientSite_GetContainer(This->client, &This->container); + + hres = IOleClientSite_GetContainer(This->client, &container); + if(SUCCEEDED(hres)) { + if(This->container) + IOleContainer_Release(This->container); + This->container = container; + } } if(This->doc_host.frame)