Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0439189 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Prevent NPE inside iconloader library

Bug: 120439430

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

Change-Id: I01679d01f6920c3cc945c4abe757b907f150aa23
parent 28616560
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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());