aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkAlphaThresholdFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkAlphaThresholdFilter.cpp')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 0e38cccd65..96f8365d60 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -65,6 +65,9 @@ sk_sp<SkImageFilter> SkAlphaThresholdFilter::Make(const SkRegion& region,
const SkImageFilter::CropRect* cropRect) {
innerThreshold = pin_0_1(innerThreshold);
outerThreshold = pin_0_1(outerThreshold);
+ if (innerThreshold > outerThreshold) {
+ return nullptr;
+ }
if (!SkScalarIsFinite(innerThreshold) || !SkScalarIsFinite(outerThreshold)) {
return nullptr;
}