Fix crash when a resource is cancelled due to browser closing (issue #2165)

This commit is contained in:
Andrew Warnick 2017-05-09 15:30:48 +00:00 committed by Marshall Greenblatt
parent e5ad5a8fcd
commit 96f9108343
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ void SendExecuteMimeTypeHandlerEvent(
web_contents = content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(render_process_id, render_frame_id));
}
if (!web_contents)
return;
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForContents(web_contents);