diff options
author | Hal Canary <halcanary@google.com> | 2017-03-21 14:00:35 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-21 22:04:36 +0000 |
commit | 27ecd86b61e6650e9921712e803fb965c7276618 (patch) | |
tree | 8a95a798f78b75c9313536a352f3fd8457385c70 /src/effects | |
parent | ebbdec4622201e17c3eae2dc9e72de8f547d53a6 (diff) |
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>
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkImageSource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp index 9c32cf8775..96f5bf48d3 100644 --- a/src/effects/SkImageSource.cpp +++ b/src/effects/SkImageSource.cpp @@ -27,7 +27,7 @@ sk_sp<SkImageFilter> SkImageSource::Make(sk_sp<SkImage> image, const SkRect& srcRect, const SkRect& dstRect, SkFilterQuality filterQuality) { - if (!image) { + if (!image || srcRect.width() <= 0.0f || srcRect.height() <= 0.0f) { return nullptr; } |