diff options
author | caryclark <caryclark@google.com> | 2014-10-03 05:36:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-03 05:36:27 -0700 |
commit | d751ac01a3a887bc2d71146fc7353a5f33730043 (patch) | |
tree | 714cb383cc2947e4e5f15306c49f7163fd5742d4 /src/pathops/SkPathOpsOp.cpp | |
parent | d012877a6d30ae768f9ccf3239ba09d730cbb6a5 (diff) |
abort op early if path isn't parseable
TBR=
BUG=419649
Review URL: https://codereview.chromium.org/623943002
Diffstat (limited to 'src/pathops/SkPathOpsOp.cpp')
-rw-r--r-- | src/pathops/SkPathOpsOp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp index 4c6923abb6..72efb89d10 100644 --- a/src/pathops/SkPathOpsOp.cpp +++ b/src/pathops/SkPathOpsOp.cpp @@ -270,6 +270,9 @@ bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) { SkTArray<SkOpContour> contours; // FIXME: add self-intersecting cubics' T values to segment SkOpEdgeBuilder builder(*minuend, contours); + if (builder.unparseable()) { + return false; + } const int xorMask = builder.xorMask(); builder.addOperand(*subtrahend); if (!builder.finish()) { |