Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Unified Diff: src/pathops/SkOpCoincidence.cpp

Issue 2327053002: fix fuzzer (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpCoincidence.cpp
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 0548ed5a0594157971d3773d3502de79b46303e7..b0cb2437006ad5aea83f6a0e3af96a03f33661f1 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -551,8 +551,8 @@ double SkOpCoincidence::TRange(const SkOpPtT* overS, double t,
do {
const SkOpPtT* contained = work->contains(coinSeg);
if (!contained) {
- if (work->t() >= t) {
- return 1;
+ if (work->final()) {
+ break;
}
continue;
}
@@ -567,8 +567,9 @@ double SkOpCoincidence::TRange(const SkOpPtT* overS, double t,
}
SkASSERT(work->ptT() != overE);
} while ((work = work->upCast()->next()));
- SkASSERT(coinStart);
- SkASSERT(coinEnd);
+ if (!coinStart || !coinEnd) {
+ return 1;
+ }
// while overS->fT <=t and overS contains coinSeg
double denom = foundEnd->fT - foundStart->fT;
double sRatio = denom ? (t - foundStart->fT) / denom : 1;
« no previous file with comments | « no previous file | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698