mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Add nullcheck in nsSVGUtils::PaintFrameWithEffects
Some SVGs define a mask but an invalid mask frame. Check to make sure we have a `maskFrame` that isn't null before trying to use it. This resolves #1034
This commit is contained in:
parent
4a60de1031
commit
59d7005617
1 changed files with 6 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue