mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Adding null check when creating icon bitmap
Bug: 24299267 Change-Id: I596e4a8dbd4e45cffff75e6cf7bbbf7ec45c8ec9
This commit is contained in:
@@ -208,7 +208,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