Bug 1576372 - Check the validity of the DrawTarget before rendering SVG content into it. r=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D43751

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Silva 2019-08-28 13:16:58 +00:00
parent 6321d98bb4
commit bf5ea4cb2d

View File

@ -645,6 +645,11 @@ void SVGGeometryFrame::Render(gfxContext* aContext, uint32_t aRenderComponents,
DrawTarget* drawTarget = aContext->GetDrawTarget();
MOZ_ASSERT(drawTarget);
if (!drawTarget->IsValid()) {
return;
}
FillRule fillRule = nsSVGUtils::ToFillRule(
(GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) ? StyleSVG()->mClipRule
: StyleSVG()->mFillRule);