mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix crash in CefResourceDispatcherHostDelegate::HandleExternalProtocol when destroying a browser during redirect (issue #1941)
This commit is contained in:
@@ -97,10 +97,12 @@ bool CefResourceDispatcherHostDelegate::HandleExternalProtocol(
|
||||
}
|
||||
|
||||
content::WebContents* web_contents = web_contents_getter.Run();
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (browser.get())
|
||||
browser->HandleExternalProtocol(url);
|
||||
if (web_contents) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (browser.get())
|
||||
browser->HandleExternalProtocol(url);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user