mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix crash due to NULL frame during navigation (fixes issue #2772)
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user