diff options
author | Robert Phillips <robertphillips@google.com> | 2017-02-14 10:03:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-14 15:36:13 +0000 |
commit | 6a307cc6c48328edad1bca620d5718b402fc87f1 (patch) | |
tree | 889365491e7a4c186110c7491ef5cfa5a569739f | |
parent | ce44a0f4e7d1e85b09af9c1edfab3ba897ebc05d (diff) |
Add check for finite phase to SkPath1DPathEffect::Make
Change-Id: I600f2e697769ecdb9080cda1533104231e00b14c
Reviewed-on: https://skia-review.googlesource.com/8406
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | src/effects/Sk1DPathEffect.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp index 2247a79993..37cd13052e 100644 --- a/src/effects/Sk1DPathEffect.cpp +++ b/src/effects/Sk1DPathEffect.cpp @@ -205,7 +205,8 @@ void SkPath1DPathEffect::toString(SkString* str) const { sk_sp<SkPathEffect> SkPath1DPathEffect::Make(const SkPath& path, SkScalar advance, SkScalar phase, Style style) { - if (advance <= 0 || !SkScalarIsFinite(advance) || path.isEmpty()) { + if (advance <= 0 || !SkScalarIsFinite(advance) || + !SkScalarIsFinite(phase) || path.isEmpty()) { return nullptr; } return sk_sp<SkPathEffect>(new SkPath1DPathEffect(path, advance, phase, style)); |