diff options
-rw-r--r-- | fuzz/FuzzCanvas.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index a14468f033..9e117af66f 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp @@ -183,7 +183,11 @@ static sk_sp<SkColorFilter> make_fuzz_colorfilter(Fuzz* fuzz, int depth) { } case 2: { sk_sp<SkColorFilter> outer = make_fuzz_colorfilter(fuzz, depth - 1); + if (!outer) { + return nullptr; + } sk_sp<SkColorFilter> inner = make_fuzz_colorfilter(fuzz, depth - 1); + // makeComposed should be able to handle nullptr. return outer->makeComposed(std::move(inner)); } case 3: { |