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

Commit bb6dd75f authored by Abhishek Aggarwal's avatar Abhishek Aggarwal
Browse files

AdaptiveIconDrawableCompat: Check that height and width are greather than 0

parent 93d0d547
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -357,7 +357,8 @@ public class AdaptiveIconDrawableCompat extends Drawable implements Drawable.Cal
        mMaskMatrix.setScale(b.width() / MASK_SIZE, b.height() / MASK_SIZE);
        sMask.transform(mMaskMatrix, mMask);

        if (mMaskBitmap == null || mMaskBitmap.getWidth() != b.width() || mMaskBitmap.getHeight() != b.height()) {
        if ((mMaskBitmap == null || mMaskBitmap.getWidth() != b.width() || mMaskBitmap.getHeight() != b.height())
                && (b.height() > 0 && b.width() > 0)) {
            mMaskBitmap = Bitmap.createBitmap(b.width(), b.height(), Bitmap.Config.ALPHA_8);
            mLayersBitmap = Bitmap.createBitmap(b.width(), b.height(), Bitmap.Config.ARGB_8888);
        }