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

Unified Diff: chrome/browser/views/location_bar_view.cc

Issue 339005: Fix crash when a page action cannot load its icon. (Closed)
Patch Set: Created 11 years, 2 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/views/location_bar_view.cc
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 70ce47825485a887dcd6714011555dc802918a97..3793d528170e7689dfcfe101bc40b078777b978a 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -1314,7 +1314,8 @@ void LocationBarView::PageActionImageView::OnImageLoaded(SkBitmap* image,
DCHECK(index < page_action_icons_.size());
if (index == page_action_icons_.size() - 1)
tracker_ = NULL; // The tracker object will delete itself when we return.
- page_action_icons_[index] = *image;
+ if (image)
+ page_action_icons_[index] = *image;
owner_->UpdatePageActions();
}
« 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