Index: src/pathops/SkOpCoincidence.cpp |
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp |
index 9175e858be46be58e1d715859777e09e7d146201..0d808db4544bbf95fb8d85a412f614b9abfeb75e 100755 |
--- a/src/pathops/SkOpCoincidence.cpp |
+++ b/src/pathops/SkOpCoincidence.cpp |
@@ -91,8 +91,14 @@ bool SkOpCoincidence::addExpanded(SkChunkAlloc* allocator |
if (!test->ptT()->contains(oTest->ptT())) { |
// use t ranges to guess which one is missing |
double startRange = coin->fCoinPtTEnd->fT - startPtT->fT; |
+ if (!startRange) { |
+ return false; |
+ } |
double startPart = (test->t() - startPtT->fT) / startRange; |
double oStartRange = coin->fOppPtTEnd->fT - oStartPtT->fT; |
+ if (!oStartRange) { |
+ return false; |
+ } |
double oStartPart = (oTest->t() - oStartPtT->fT) / oStartRange; |
if (startPart == oStartPart) { |
return false; |