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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm

Issue 834173002: Add null check in LocationIconDecoration::OnMousePressed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 85c6907c30189afd323a53fe9016ea5e21676aab..9d32ef83bc1dd00020fe0cce79dc091a6027f3cd 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -115,7 +115,8 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame, NSPoint location) {
const NavigationController& controller = tab->GetController();
// Important to use GetVisibleEntry to match what's showing in the omnibox.
NavigationEntry* nav_entry = controller.GetVisibleEntry();
- DCHECK(nav_entry);
+ if (!nav_entry)
+ return true;
Browser* browser = chrome::FindBrowserWithWebContents(tab);
chrome::ShowWebsiteSettings(browser, tab, nav_entry->GetURL(),
nav_entry->GetSSL());
« 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