Prevent NPE inside iconloader library

Bug: 120439430

Even though there is @NonNull annotation, customers may not respect
this annotation.

Change-Id: I01679d01f6920c3cc945c4abe757b907f150aa23
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());