Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2273613003: Add a null check for last committed entry in ClassifyNavigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 124346013c998a5b9e8c63f03feede3a243008a8..d998d43afd76f05dc52b2f5d110bc006b7e5916c 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1011,7 +1011,8 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
// make sure Blink didn't treat a new cross-process navigation as inert, and
// thus set params.did_create_new_entry to false. In that case, we must
// treat it as NEW since the SiteInstance doesn't match the entry.
- if (GetLastCommittedEntry()->site_instance() != rfh->GetSiteInstance())
+ if (GetLastCommittedEntry() &&
+ GetLastCommittedEntry()->site_instance() != rfh->GetSiteInstance())
return NAVIGATION_TYPE_NEW_PAGE;
// Otherwise, this happens when you press enter in the URL bar to reload. We
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698