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

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

Issue 10857024: Attempt at fixing crash. Because BrowserActionView lazily creates its (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/ui/views/action_box_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/browser_action_view.cc
diff --git a/chrome/browser/ui/views/browser_action_view.cc b/chrome/browser/ui/views/browser_action_view.cc
index 19f817a2be176cf0d0cc1f13d2be946c4fdf675c..5db3bad73e3ebcb48bf7cf6d2dd652029d6ad8d0 100644
--- a/chrome/browser/ui/views/browser_action_view.cc
+++ b/chrome/browser/ui/views/browser_action_view.cc
@@ -64,6 +64,10 @@ gfx::ImageSkia BrowserActionView::GetIconWithBadge() {
}
void BrowserActionView::Layout() {
+ // |button_| is NULL if Layout() is invoked before we have a valid widget.
+ if (!button_)
+ return;
+
// We can't rely on button_->GetPreferredSize() here because that's not set
// correctly until the first call to
// BrowserActionsContainer::RefreshBrowserActionViews(), whereas this can be
« no previous file with comments | « chrome/browser/ui/views/action_box_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698