summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher2/WallpaperChooser.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/launcher2/WallpaperChooser.java b/src/com/android/launcher2/WallpaperChooser.java
index a5cce067a..a74fa6a56 100644
--- a/src/com/android/launcher2/WallpaperChooser.java
+++ b/src/com/android/launcher2/WallpaperChooser.java
@@ -171,9 +171,17 @@ public class WallpaperChooser extends Activity implements AdapterView.OnItemSele
} else {
image = (ImageView) convertView;
}
-
- image.setImageResource(mThumbs.get(position));
- image.getDrawable().setDither(true);
+
+ int thumbRes = mThumbs.get(position);
+ image.setImageResource(thumbRes);
+ Drawable thumbDrawable = image.getDrawable();
+ if (thumbDrawable != null) {
+ thumbDrawable.setDither(true);
+ } else {
+ Log.e(Launcher.LOG_TAG, String.format(
+ "Error decoding thumbnail resId=%d for wallpaper #%d",
+ thumbRes, position));
+ }
return image;
}
}