diff options
Diffstat (limited to 'layout/svg/nsSVGUtils.cpp')
-rw-r--r-- | layout/svg/nsSVGUtils.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index b8794a05d..98e5f9b5f 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -685,7 +685,7 @@ nsSVGUtils::PaintFrameWithEffects(nsIFrame *aFrame, bool isOK = effectProperties.HasNoFilterOrHasValidFilter(); nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame(&isOK); nsSVGMaskFrame *maskFrame = effectProperties.GetFirstMaskFrame(&isOK); - if (!isOK || !maskFrame) { + if (!isOK) { // Some resource is invalid. We shouldn't paint anything. return DrawResult::SUCCESS; } @@ -734,9 +734,12 @@ nsSVGUtils::PaintFrameWithEffects(nsIFrame *aFrame, RefPtr<SourceSurface> maskSurface; if (maskUsage.shouldGenerateMaskLayer) { - maskSurface = - maskFrame->GetMaskForMaskedFrame(&aContext, aFrame, aTransform, - maskUsage.opacity, &maskTransform); + // Make sure we have a mask frame. + if (maskFrame) { + maskSurface = + maskFrame->GetMaskForMaskedFrame(&aContext, aFrame, aTransform, + maskUsage.opacity, &maskTransform); + } if (!maskSurface) { // Entire surface is clipped out. |