From 466f571a516b2bc6af69f71e7dff6b48ce1efdbc Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Tue, 26 Nov 2019 13:40:35 -0500 Subject: [PATCH] [skottie] Handle null mask filter effects gracefully We allow animating the mask filters, so we can end up with null filters sometimes. TBR= Change-Id: Id93aa033407f58bfeb5e059210141c936c356701 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256697 Reviewed-by: Florin Malita Commit-Queue: Florin Malita --- modules/sksg/src/SkSGRenderNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sksg/src/SkSGRenderNode.cpp b/modules/sksg/src/SkSGRenderNode.cpp index 01ae80c066..5c75d5d2ca 100644 --- a/modules/sksg/src/SkSGRenderNode.cpp +++ b/modules/sksg/src/SkSGRenderNode.cpp @@ -142,7 +142,7 @@ RenderNode::ScopedRenderContext::modulateMaskFilter(sk_sp mf, cons // => T = Inv(maskCTM) x ctm // SkMatrix invMaskCTM; - if (fCtx.fMaskCTM.invert(&invMaskCTM)) { + if (mf && fCtx.fMaskCTM.invert(&invMaskCTM)) { const auto relative_transform = SkMatrix::Concat(invMaskCTM, ctm); fCtx.fMaskFilter = SkMaskFilter::MakeCompose(std::move(fCtx.fMaskFilter), mf->makeWithMatrix(relative_transform));