From bb6dd75ff103b0786441756ac7c05c2eaef4c786 Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Wed, 8 Nov 2023 18:59:50 +0530 Subject: [PATCH] AdaptiveIconDrawableCompat: Check that height and width are greather than 0 --- .../core/customviews/AdaptiveIconDrawableCompat.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/foundation/e/blisslauncher/core/customviews/AdaptiveIconDrawableCompat.java b/app/src/main/java/foundation/e/blisslauncher/core/customviews/AdaptiveIconDrawableCompat.java index 1c72f87878..71eee58051 100755 --- a/app/src/main/java/foundation/e/blisslauncher/core/customviews/AdaptiveIconDrawableCompat.java +++ b/app/src/main/java/foundation/e/blisslauncher/core/customviews/AdaptiveIconDrawableCompat.java @@ -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); } -- GitLab