aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkImageSource.cpp2
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;
}