Index: src/pathops/SkOpBuilder.cpp |
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp |
index 6652c10d52571753d099d9d47d24fec3ee7295b5..ede1ed0b4350dbb549b878e1a8acc99fcdd21ac1 100644 |
--- a/src/pathops/SkOpBuilder.cpp |
+++ b/src/pathops/SkOpBuilder.cpp |
@@ -47,7 +47,12 @@ bool FixWinding(SkPath* path) { |
SkOpGlobalState globalState(&contourHead, &allocator SkDEBUGPARAMS(false) |
SkDEBUGPARAMS(nullptr)); |
SkOpEdgeBuilder builder(*path, &contourHead, &globalState); |
- builder.finish(); |
+ if (builder.unparseable() || !builder.finish()) { |
+ return false; |
+ } |
+ if (!contourHead.count()) { |
+ return true; |
+ } |
SkASSERT(contourHead.next()); |
contourHead.resetReverse(); |
bool writePath = false; |