ieframe: Keep reference to ShellObject while calling DocumentComplete event.

This commit is contained in:
Jacek Caban 2013-05-15 12:52:41 +02:00 committed by Alexandre Julliard
parent 6621b11ad1
commit 3a1ce6a864
1 changed files with 7 additions and 1 deletions

View File

@ -824,12 +824,18 @@ static HRESULT WINAPI DocObjectService_FireDocumentComplete(
V_VT(&url_var) = VT_BSTR;
V_BSTR(&url_var) = url;
/* Keep reference to This. It may be released in event handler. */
IShellBrowser_AddRef(&This->IShellBrowser_iface);
TRACE(">>>\n");
call_sink(This->doc_host->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dp);
TRACE("<<<\n");
SysFreeString(url);
if(This->doc_host)
This->doc_host->busy = VARIANT_FALSE;
IShellBrowser_Release(&This->IShellBrowser_iface);
return S_OK;
}