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

Commit 9d0afcd9 authored by ztenghui's avatar ztenghui Committed by The Android Automerger
Browse files

Don't draw when bounds are negative

b/19922909

Change-Id: I68559ed683031f57538439e0a3e4979fe9f430a5
parent f626f00c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -249,8 +249,8 @@ public class VectorDrawable extends Drawable {
    @Override
    public void draw(Canvas canvas) {
        final Rect bounds = getBounds();
        if (bounds.width() == 0 || bounds.height() == 0) {
            // too small to draw
        if (bounds.width() <= 0 || bounds.height() <= 0) {
            // Nothing to draw
            return;
        }