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

Commit 94bea5a6 authored by Matthew Ng's avatar Matthew Ng
Browse files

Fix NPE in color tint getting bitmap

Bug: 112934365
Test: manual

Change-Id: Ie25b5fa2764cbd61ab2b78b5554b08c760446d26
parent 1485a60b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ public class NavBarTintController {
        final Bitmap hardBitmap = SurfaceControl
                .screenshot(new Rect(), mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels,
                        mNavigationBarView.getContext().getDisplay().getRotation());
        if (cropRect.bottom <= hardBitmap.getHeight()
        if (hardBitmap != null && cropRect.bottom <= hardBitmap.getHeight()
                && cropRect.left + cropRect.width() <= hardBitmap.getWidth()) {
            final Bitmap cropBitmap = Bitmap.createBitmap(hardBitmap, cropRect.left, cropRect.top,
                    cropRect.width(), cropRect.height());