diff options
author | caryclark <caryclark@google.com> | 2016-01-29 09:54:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-29 09:54:20 -0800 |
commit | 703348f5fac69dbedf22cda2ce264d2c9683bcf3 (patch) | |
tree | 2d8dffcb9a19873ec2593098ffdc999f05e32526 /src/core/SkPathMeasure.cpp | |
parent | f2b340fc885ad2a12d2d73974eff9c8f4c94192c (diff) |
fix teeny dashed path bug
If the path dashed is sufficiently small, there may be no
segments generated to dash. Check for an empty segment list.
R=reed@google.com
BUG=skia:4871
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1645613006
Review URL: https://codereview.chromium.org/1645613006
Diffstat (limited to 'src/core/SkPathMeasure.cpp')
-rw-r--r-- | src/core/SkPathMeasure.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index b06bef7fc5..c0d97924cb 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -652,6 +652,9 @@ bool SkPathMeasure::getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, if (startD > stopD) { return false; } + if (!fSegments.count()) { + return false; + } SkPoint p; SkScalar startT, stopT; |