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

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc

Issue 2954563002: cros: Fix wallpaper manager indexing vector out-of-range issue (Closed)
Patch Set: Created 3 years, 6 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/chromeos/login/users/wallpaper/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
index 29a0a38524e9d718f543ed5daa3464b23409e089..7b01d15668ac392604ae410c77589ed6f9d81e4f 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -950,7 +950,7 @@ void WallpaperManager::OnWindowDestroying(aura::Window* window) {
void WallpaperManager::OnColorCalculationComplete() {
size_t num_of_calculation = color_calculator_->prominent_colors().size();
DCHECK_EQ(1u, num_of_calculation);
- SkColor color = color_calculator_->prominent_colors()[num_of_calculation];
+ SkColor color = color_calculator_->prominent_colors()[num_of_calculation - 1];
color_calculator_->RemoveObserver(this);
color_calculator_.reset();
if (prominent_color_ == color)
« 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