summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-09-28 18:46:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-28 18:46:18 +0000
commit81284287a761a9ee512bd7d4857995fdd8d8dcbc (patch)
tree7725cbf636cd7f0b19d4aa17d93d4226fc6fe61b /src/com/android/launcher3
parentf768d934682ba80da89d454543928e629a44103d (diff)
parentde9590be4ca2779ae0f7f64a48ac8b90472484f8 (diff)
downloadandroid_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.tar.gz
android_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.tar.bz2
android_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.zip
am de9590be: Adding null check when creating icon bitmap
* commit 'de9590be4ca2779ae0f7f64a48ac8b90472484f8': Adding null check when creating icon bitmap
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/Utilities.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index d5b28985c..d054da31c 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -211,7 +211,7 @@ public final class Utilities {
// Ensure the bitmap has a density.
BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
Bitmap bitmap = bitmapDrawable.getBitmap();
- if (bitmap.getDensity() == Bitmap.DENSITY_NONE) {
+ if (bitmap != null && bitmap.getDensity() == Bitmap.DENSITY_NONE) {
bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics());
}
}