aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsTSect.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-10-07 11:15:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-07 11:15:16 -0700
commit221a4bb55b51a6ba3882811990581d4bdb6bd539 (patch)
treede2099b7b140edf923bc8072016f3b37178976f4 /src/pathops/SkPathOpsTSect.h
parenta71e151c6f0be68dc96ad2d169bbc31edca8f946 (diff)
fix fuzz busters
When fuzz is hit just quit TBR=reed@google.com BUG=skia:5837, skia:5838, skia:5839 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2404483002 Review-Url: https://codereview.chromium.org/2404483002
Diffstat (limited to 'src/pathops/SkPathOpsTSect.h')
-rw-r--r--src/pathops/SkPathOpsTSect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pathops/SkPathOpsTSect.h b/src/pathops/SkPathOpsTSect.h
index a04a4e442f..f22322bbe1 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;
}