urlmon: Avoid ProtocolHandler being destroyed in Terminate call.

This commit is contained in:
Jacek Caban 2014-05-15 18:56:51 +02:00 committed by Alexandre Julliard
parent 810d8c7140
commit 54bf34f1e7
1 changed files with 4 additions and 0 deletions

View File

@ -698,6 +698,9 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
if(!This->reported_result) if(!This->reported_result)
return E_FAIL; return E_FAIL;
/* This may get released in Terminate call. */
IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface);
IInternetProtocol_Terminate(This->protocol, 0); IInternetProtocol_Terminate(This->protocol, 0);
set_binding_sink(This, NULL, NULL); set_binding_sink(This, NULL, NULL);
@ -707,6 +710,7 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
This->bind_info = NULL; This->bind_info = NULL;
} }
IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface);
return S_OK; return S_OK;
} }