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

Unified Diff: chrome/browser/ui/browser.cc

Issue 7792014: Fixes crash in Browser::Observe. We can end up here during creation of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment tweaks Created 9 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 66990b19eabdc543c08b2798849d14e905f76b8a..06016f038c040bb9de5eb0b552f9b112cfce15c6 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3927,7 +3927,9 @@ void Browser::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
case chrome::NOTIFICATION_EXTENSION_LOADED:
- if (window()->GetLocationBar())
+ // We can end up here when creating the window, at which point window_ is
+ // NULL.
Ben Goodger (Google) 2011/08/30 17:19:49 Add the rest of your CL comment here about SHAppBa
+ if (window() && window()->GetLocationBar())
window()->GetLocationBar()->UpdatePageActions();
break;
« 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