Index: src/pathops/SkOpSegment.cpp |
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp |
index 6012d832bf349cb63d607bcf22a5ccc719a5fc10..439392fc4f6215854e84e0d80660e7903a4be449 100644 |
--- a/src/pathops/SkOpSegment.cpp |
+++ b/src/pathops/SkOpSegment.cpp |
@@ -169,18 +169,18 @@ bool SkOpSegment::addCurveTo(const SkOpSpanBase* start, const SkOpSpanBase* end, |
path->deferredMove(start->ptT()); |
switch (verb) { |
case SkPath::kLine_Verb: |
- path->deferredLine(end->ptT()); |
+ FAIL_IF(!path->deferredLine(end->ptT())); |
break; |
case SkPath::kQuad_Verb: |
- path->quadTo(curvePart.fCurve.fQuad.fPts[1].asSkPoint(), end->ptT()); |
+ path->quadTo(curvePart.fCurve.fQuad[1].asSkPoint(), end->ptT()); |
break; |
case SkPath::kConic_Verb: |
- path->conicTo(curvePart.fCurve.fConic.fPts[1].asSkPoint(), end->ptT(), |
+ path->conicTo(curvePart.fCurve.fConic[1].asSkPoint(), end->ptT(), |
curvePart.fCurve.fConic.fWeight); |
break; |
case SkPath::kCubic_Verb: |
- path->cubicTo(curvePart.fCurve.fCubic.fPts[1].asSkPoint(), |
- curvePart.fCurve.fCubic.fPts[2].asSkPoint(), end->ptT()); |
+ path->cubicTo(curvePart.fCurve.fCubic[1].asSkPoint(), |
+ curvePart.fCurve.fCubic[2].asSkPoint(), end->ptT()); |
break; |
default: |
SkASSERT(0); |
@@ -225,6 +225,7 @@ bool SkOpSegment::addExpanded(double newT, const SkOpSpanBase* test, bool* start |
return true; |
} |
this->globalState()->resetAllocatedOpSpan(); |
+ FAIL_IF(!between(0, newT, 1)); |
SkOpPtT* newPtT = this->addT(newT); |
*startOver |= this->globalState()->allocatedOpSpan(); |
if (!newPtT) { |