From 34c623cbf3677820c4170f24c5211f663dda91f7 Mon Sep 17 00:00:00 2001 From: ztenghui Date: Wed, 25 Mar 2015 15:01:56 -0700 Subject: [PATCH] Don't draw when bounds are negative b/19922909 Change-Id: I68559ed683031f57538439e0a3e4979fe9f430a5 --- graphics/java/android/graphics/drawable/VectorDrawable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index 39a33ce05e872..56477394d0a19 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -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; }