Module: wine Branch: master Commit: ef9bb15192a9b3919bc23e68842306abb7835121 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef9bb15192a9b3919bc23e6884...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Apr 19 10:35:11 2011 +0200
shdocvw: Properly handle IEDocHost refcount.
---
dlls/shdocvw/ie.c | 4 +++- dlls/shdocvw/iexplore.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/shdocvw/ie.c b/dlls/shdocvw/ie.c index 491f025..757cbb5 100644 --- a/dlls/shdocvw/ie.c +++ b/dlls/shdocvw/ie.c @@ -81,8 +81,10 @@ static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface) if(!ref) { if(This->doc_host) { DocHost_Release(&This->doc_host->doc_host); - if(This->doc_host) + if(This->doc_host) { This->doc_host->ie = NULL; + This->doc_host->doc_host.container_vtbl->release(&This->doc_host->doc_host); + } }
if(This->frame_hwnd) diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c index aebe7c9..f079e62 100644 --- a/dlls/shdocvw/iexplore.c +++ b/dlls/shdocvw/iexplore.c @@ -718,7 +718,7 @@ static ULONG IEDocHost_release(DocHost *iface)
if(!ref) { if(This->ie) - This->ie->doc_host = NULL; + ERR("This->ie is not NULL\n"); heap_free(This); }
@@ -777,6 +777,7 @@ static HRESULT create_ie(InternetExplorer **ret_obj) }
ret->ref = 1; + ret->doc_host->ref = 1; ret->doc_host->ie = ret;
DocHost_Init(&ret->doc_host->doc_host, (IDispatch*)&ret->IWebBrowser2_iface, &DocHostContainerVtbl);