Index: src/pathops/SkPathOpsCommon.cpp |
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp |
index b4049bc5d9bd30f2502319e345a997fe49fdf12c..a1cd7bbd63089219f3f79447a3c6bc98e97d7ad9 100644 |
--- a/src/pathops/SkPathOpsCommon.cpp |
+++ b/src/pathops/SkPathOpsCommon.cpp |
@@ -235,11 +235,14 @@ static void move_nearby(SkOpContourHead* contourList DEBUG_COIN_DECLARE_PARAMS( |
} while ((contour = contour->next())); |
} |
-static void sort_angles(SkOpContourHead* contourList) { |
+static bool sort_angles(SkOpContourHead* contourList) { |
SkOpContour* contour = contourList; |
do { |
- contour->sortAngles(); |
+ if (!contour->sortAngles()) { |
+ return false; |
+ } |
} while ((contour = contour->next())); |
+ return true; |
} |
bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidence) { |
@@ -327,7 +330,9 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc |
} |
} while (!overlaps.isEmpty()); |
calc_angles(contourList DEBUG_COIN_PARAMS()); |
- sort_angles(contourList); |
+ if (!sort_angles(contourList)) { |
+ return false; |
+ } |
#if DEBUG_COINCIDENCE_VERBOSE |
coincidence->debugShowCoincidence(); |
#endif |