summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-27 19:19:56 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-27 19:19:56 +0000
commitfc90db7ed479d499fbad3f3f96255fa713adb45b (patch)
tree0d2c0797acb84ebe229574305ec5df4d5f0d274f /ash/desktop_background
parenta8233efb7b10dca3398884ae4d068650b1e9f9ed (diff)
downloadchromium_src-fc90db7ed479d499fbad3f3f96255fa713adb45b.zip
chromium_src-fc90db7ed479d499fbad3f3f96255fa713adb45b.tar.gz
chromium_src-fc90db7ed479d499fbad3f3f96255fa713adb45b.tar.bz2
Fix crash in MigrateBuiltInWallpaper
This CL should fix crash that cause by updating from an official build to non official build. In which case, we may try to access an invalid resources id. As described in 152224, there maybe some other case cause the crash. I will keep investigating. BUG=152224 Review URL: https://chromiumcodereview.appspot.com/10981038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_resources.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc
index 484bbbc..4f2f828 100644
--- a/ash/desktop_background/desktop_background_resources.cc
+++ b/ash/desktop_background/desktop_background_resources.cc
@@ -470,6 +470,7 @@ const WallpaperInfo& GetWallpaperInfo(int index) {
const WallpaperViewInfo& GetWallpaperViewInfo(int index,
WallpaperResolution resolution) {
+ DCHECK(index >= 0 && index < kDefaultWallpaperCount);
if (resolution == SMALL)
return kDefaultWallpapers[index].small_wallpaper;
else