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

Unified Diff: src/pathops/SkPathOpsTSect.h

Issue 2404483002: fix fuzz busters (Closed)
Patch Set: Created 4 years, 2 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 | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsTSect.h
diff --git a/src/pathops/SkPathOpsTSect.h b/src/pathops/SkPathOpsTSect.h
index a04a4e442fc89dc9b10805c8502dffe76d14760c..f22322bbe16248ec44aa4454f98e260ea7a5e9a4 100644
--- a/src/pathops/SkPathOpsTSect.h
+++ b/src/pathops/SkPathOpsTSect.h
@@ -1594,6 +1594,9 @@ void SkTSect<TCurve, OppCurve>::mergeCoincidence(SkTSect<OppCurve, TCurve>* sect
SkTSpan<TCurve, OppCurve>* smaller = nullptr;
SkTSpan<TCurve, OppCurve>* test = fCoincident;
do {
+ if (!test) {
+ return;
+ }
if (test->fStartT < smallLimit) {
continue;
}
@@ -1615,7 +1618,7 @@ void SkTSect<TCurve, OppCurve>::mergeCoincidence(SkTSect<OppCurve, TCurve>* sect
if (test->fStartT < smaller->fEndT) {
continue;
}
- SkASSERT(test->fStartT != smaller->fEndT);
+ SkOPASSERT(test->fStartT != smaller->fEndT);
if (larger && larger->fStartT < test->fStartT) {
continue;
}
@@ -2224,6 +2227,9 @@ void SkTSect<TCurve, OppCurve>::BinarySearch(SkTSect<TCurve, OppCurve>* sect1,
}
SkASSERT(sect2->fCoincident); // courtesy check : coincidence only looks at sect 1
do {
+ if (!coincident) {
+ return;
+ }
if (!coincident->fCoinStart.isMatch()) {
continue;
}
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698