summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
index af1b3530e..76abe8d1b 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
@@ -263,7 +263,9 @@ public class BaseIconFactory implements AutoCloseable {
*/
public Bitmap createIconBitmap(Drawable icon, float scale, int size) {
Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
-
+ if (icon == null) {
+ return bitmap;
+ }
mCanvas.setBitmap(bitmap);
mOldBounds.set(icon.getBounds());