mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
am de9590be: Adding null check when creating icon bitmap
* commit 'de9590be4ca2779ae0f7f64a48ac8b90472484f8': Adding null check when creating icon bitmap
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user