diff options
Diffstat (limited to 'chrome/browser/gtk/location_bar_view_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/location_bar_view_gtk.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc index 8648099..382563a 100644 --- a/chrome/browser/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/gtk/location_bar_view_gtk.cc @@ -409,6 +409,15 @@ void LocationBarViewGtk::UpdatePageActions() { if (profile_->GetExtensionsService()) page_actions = profile_->GetExtensionsService()->GetPageActions(); + // Page actions can be created without an icon, so make sure we count only + // those that have been given an icon. + for (size_t i = 0; i < page_actions.size();) { + if (page_actions[i]->icon_paths().empty()) + page_actions.erase(page_actions.begin() + i); + else + ++i; + } + // Initialize on the first call, or re-inialize if more extensions have been // loaded or added after startup. if (page_actions.size() != page_action_views_.size()) { |