mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
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:
parent
6321d98bb4
commit
bf5ea4cb2d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user