fix pathops fuzz

recent fuzz hang fix returned nullptr
and could cause crash

R=kjlubick@google.com

Bug: skia:8481
Change-Id: Ie8291077aa5f4e4b878f204b2a9ff71d2c1f7b94
Reviewed-on: https://skia-review.googlesource.com/c/163480
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Cary Clark 2018-10-18 13:07:14 -04:00 committed by Skia Commit-Bot
parent d18e14c69e
commit fc48b61592

View File

@ -673,6 +673,9 @@ void SkTSect::coincidentForce(SkTSect* sect2,
SkTSpan* last = this->tail();
SkTSpan* oppFirst = sect2->fHead;
SkTSpan* oppLast = sect2->tail();
if (!last || !oppLast) {
return;
}
bool deleteEmptySpans = this->updateBounded(first, last, oppFirst);
deleteEmptySpans |= sect2->updateBounded(oppFirst, oppLast, first);
this->removeSpanRange(first, last);