commit | 27ecd86b61e6650e9921712e803fb965c7276618 | [log] [tgz] |
---|---|---|
author | Hal Canary <halcanary@google.com> | Tue Mar 21 14:00:35 2017 -0700 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Tue Mar 21 22:04:36 2017 +0000 |
tree | 8a95a798f78b75c9313536a352f3fd8457385c70 | |
parent | ebbdec4622201e17c3eae2dc9e72de8f547d53a6 [diff] [blame] |
SkImageSource::Make() returns nullptr when srcrect is empty. BUG=skia:6389 Change-Id: Ia995da1f70cbbc0c80ab76385f0ea8cc0d48fa07 Reviewed-on: https://skia-review.googlesource.com/9943 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp index 9c32cf8..96f5bf4 100644 --- a/src/effects/SkImageSource.cpp +++ b/src/effects/SkImageSource.cpp
@@ -27,7 +27,7 @@ const SkRect& srcRect, const SkRect& dstRect, SkFilterQuality filterQuality) { - if (!image) { + if (!image || srcRect.width() <= 0.0f || srcRect.height() <= 0.0f) { return nullptr; }