commit | bd7678635ea96d7e7164c0ed55f4fd2b3ec2c426 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Tue Feb 12 18:09:08 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue Feb 12 18:09:08 2019 +0000 |
tree | 5138d5cd6a4097601650a7f1bfa86884b25c4b23 | |
parent | edba28478c950856c7e3423d11cbc78168b244e4 [diff] | |
parent | f04391896afd01b56864710f869f4a9636d0553a [diff] |
Merge "Prevent NPE inside iconloader library" into ub-launcher3-master
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java index af1b353..76abe8d 100644 --- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java +++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
@@ -263,7 +263,9 @@ */ 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());