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

Commit 8600c562 authored by Ruben Brunk's avatar Ruben Brunk
Browse files

Fix to check if crop activity got bad bitmap.

Bug: 8692297
Change-Id: I1900c45c71b3d1c6203e4d25a7ad5354f409fcf2
parent ae52b3e3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -269,8 +269,10 @@ public class CropActivity extends Activity {
        if (mOriginalBitmap != null && mCropExtras != null) {
            if (mCropExtras.getExtraOutput() != null) {
                destinationUri = mCropExtras.getExtraOutput();
                if (destinationUri != null) {
                    flags |= DO_EXTRA_OUTPUT;
                }
            }
            if (mCropExtras.getSetAsWallpaper()) {
                flags |= DO_SET_WALLPAPER;
            }
@@ -284,7 +286,7 @@ public class CropActivity extends Activity {
                flags |= DO_EXTRA_OUTPUT;
            }
        }
        if ((flags & FLAG_CHECK) != 0) {
        if ((flags & FLAG_CHECK) != 0 && mOriginalBitmap != null) {
            RectF photo = new RectF(0, 0, mOriginalBitmap.getWidth(), mOriginalBitmap.getHeight());
            RectF crop = getBitmapCrop(photo);
            startBitmapIO(flags, mOriginalBitmap, mSourceUri, destinationUri, crop,