Merge "Don't draw when bounds are negative"

This commit is contained in:
ztenghui
2015-03-25 22:11:56 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}