mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01:00
Fix crash due to NULL frame during navigation (fixes issue #2772)
This commit is contained in:
parent
c90b65a72c
commit
679850a267
@ -2621,8 +2621,18 @@ void CefBrowserHostImpl::DidFinishNavigation(
|
||||
const GURL& url =
|
||||
(error_code == net::OK ? navigation_handle->GetURL() : GURL());
|
||||
|
||||
// May return NULL when starting a new navigation if the previous navigation
|
||||
// caused the renderer process to crash during load.
|
||||
CefRefPtr<CefFrameHostImpl> frame = browser_info_->GetFrameForFrameTreeNode(
|
||||
navigation_handle->GetFrameTreeNodeId());
|
||||
if (!frame) {
|
||||
if (is_main_frame) {
|
||||
frame = browser_info_->GetMainFrame();
|
||||
} else {
|
||||
frame =
|
||||
browser_info_->CreateTempSubFrame(CefFrameHostImpl::kInvalidFrameId);
|
||||
}
|
||||
}
|
||||
frame->RefreshAttributes();
|
||||
|
||||
if (error_code == net::OK) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user