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

Commit b9ff23ee authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[RoundedCorners] Avoid using invalid crop.

BUG: 125916918
Test: Verify with Youtube, Photos, Chrome and Camera.
Change-Id: I7d85ec2d9861a60ed8b1cc0c853107d6bef8a552
parent 8f16f41c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1804,7 +1804,8 @@ Layer::RoundedCornerState Layer::getRoundedCornerState() const {
        }
    }
    const float radius = getDrawingState().cornerRadius;
    return radius > 0 ? RoundedCornerState(getCrop(getDrawingState()).toFloatRect(), radius)
    return radius > 0 && getCrop(getDrawingState()).isValid()
            ? RoundedCornerState(getCrop(getDrawingState()).toFloatRect(), radius)
            : RoundedCornerState();
}