detect empty/inverted rect before using autobounds helper (as with prev. rev.)

git-svn-id: http://skia.googlecode.com/svn/trunk@705 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-01-18 20:55:57 +00:00
parent abf15c189b
commit 44b2c73ca6

View File

@ -488,6 +488,11 @@ static void add_corner_arc(SkPath* path, const SkRect& rect,
void SkPath::addRoundRect(const SkRect& rect, const SkScalar rad[],
Direction dir) {
// abort before we invoke SkAutoPathBoundsUpdate()
if (rect.isEmpty()) {
return;
}
SkAutoPathBoundsUpdate apbu(this, rect);
if (kCW_Direction == dir) {