Check for finite segments when inserting into ActiveEdgeList

Bug: skia:8472
Change-Id: I1463e690cdd03273a617f0c2e5fb4cf59df50679
Reviewed-on: https://skia-review.googlesource.com/c/164606
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2018-10-23 11:54:26 -04:00 committed by Skia Commit-Bot
parent a4d700d74b
commit c77cd1a843

View File

@ -657,6 +657,9 @@ public:
bool insert(const SkPoint& p0, const SkPoint& p1, uint16_t index0, uint16_t index1) {
SkVector v = p1 - p0;
if (!v.isFinite()) {
return false;
}
// empty tree case -- easy
if (!fTreeHead.fChild[1]) {
ActiveEdge* root = fTreeHead.fChild[1] = this->allocate(p0, v, index0, index1);