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

Commit bc32a51c authored by Jay Aliomer's avatar Jay Aliomer
Browse files

NullPointerException when retriving wallpaper page areas

Fixes: 191293701
Test: manual
Change-Id: I18c4d627f29848b50bb8c7dc2b4a02627ff3a89b
parent b01c33a7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1570,6 +1570,7 @@ public abstract class WallpaperService extends Service {
                        + page.getBitmap().getWidth() + " x " + page.getBitmap().getHeight());
            }
            for (RectF area: page.getAreas()) {
                if (area == null) continue;
                RectF subArea = generateSubRect(area, pageIndx, numPages);
                Bitmap b = page.getBitmap();
                int x = Math.round(b.getWidth() * subArea.left);
@@ -1933,6 +1934,7 @@ public abstract class WallpaperService extends Service {
    }

    private boolean isValid(RectF area) {
        if (area == null) return false;
        boolean valid = area.bottom > area.top && area.left < area.right
                && LOCAL_COLOR_BOUNDS.contains(area);
        return valid;