some pathops fuzz fixes
R=kjlubick@google.com
Bug: skia:
Change-Id: I0b2089f728f91ef5af780d0e9f91d266c252c054
Reviewed-on: https://skia-review.googlesource.com/c/169341
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp
index 5729827..459c731 100644
--- a/src/pathops/SkPathWriter.cpp
+++ b/src/pathops/SkPathWriter.cpp
@@ -354,7 +354,9 @@
const SkPath& contour = fPartials[rIndex];
if (!first) {
SkPoint prior, next;
- SkAssertResult(fPathPtr->getLastPt(&prior));
+ if (!fPathPtr->getLastPt(&prior)) {
+ return;
+ }
if (forward) {
next = contour.getPoint(0);
} else {