improve validate to check for empty rects, since contains always returns false
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 14 Nov 2011 18:13:59 +0000 (18:13 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 14 Nov 2011 18:13:59 +0000 (18:13 +0000)
if either rect is empty.

git-svn-id: http://skia.googlecode.com/svn/trunk@2676 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkPath.cpp

index bdf4d27..de3bb2e 100644 (file)
@@ -1434,7 +1434,11 @@ void SkPath::validate() const {
             SkASSERT(bounds.isEmpty());
             SkASSERT(fBounds.isEmpty());
         } else {
-            fBounds.contains(bounds);
+            if (bounds.isEmpty()) {
+                SkASSERT(fBounds.isEmpty());
+            } else {
+                SkASSERT(fBounds.contains(bounds));
+            }
         }
     }