check that rect is finite before jamming our bounds
Bug: skia:7507
Change-Id: I45ff36f96951f63795fdc09fdd8e3083865f6eda
Reviewed-on: https://skia-review.googlesource.com/101461
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index fe557d0..ab8bf2e 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -88,7 +88,7 @@
~SkAutoPathBoundsUpdate() {
fPath->setConvexity(fDegenerate ? SkPath::kConvex_Convexity
: SkPath::kUnknown_Convexity);
- if (fEmpty || fHasValidBounds) {
+ if ((fEmpty || fHasValidBounds) && fRect.isFinite()) {
fPath->setBounds(fRect);
}
}