aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-10-25 08:58:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-25 08:58:26 -0700
commit9feb6326d0c5407247ed1e3d8fade2f86b233001 (patch)
treee5ed56ad5fc00b2a259111149821162b6c368a1c /src
parent0117485a4a00737a63f1e9338b4343b885b4d885 (diff)
fix fuzz
Abort early if fuzz data breaks intersection. R=kjlubick@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2444333002 Review-Url: https://codereview.chromium.org/2444333002
Diffstat (limited to 'src')
-rw-r--r--src/pathops/SkPathOpsTSect.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsTSect.h b/src/pathops/SkPathOpsTSect.h
index fbfb8c138f..f3402daa67 100644
--- a/src/pathops/SkPathOpsTSect.h
+++ b/src/pathops/SkPathOpsTSect.h
@@ -992,6 +992,9 @@ SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::boundsMax() const {
template<typename TCurve, typename OppCurve>
bool SkTSect<TCurve, OppCurve>::coincidentCheck(SkTSect<OppCurve, TCurve>* sect2) {
SkTSpan<TCurve, OppCurve>* first = fHead;
+ if (!first) {
+ return false;
+ }
SkTSpan<TCurve, OppCurve>* last, * next;
do {
int consecutive = this->countConsecutiveSpans(first, &last);