Skip to content

Commit

Permalink
[LBSE] Fix null-pointer access in SVGGraphicsElement::didAttachRender…
Browse files Browse the repository at this point in the history
…ers()

https://bugs.webkit.org/show_bug.cgi?id=244798

Reviewed by Rob Buis.

Add missing layer() null check in didAttachRenderers.

* Source/WebCore/svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::didAttachRenderers):

Canonical link: https://commits.webkit.org/254161@main
  • Loading branch information
nikolaszimmermann committed Sep 5, 2022
1 parent 54560c5 commit d05d7a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/WebCore/svg/SVGGraphicsElement.cpp
Expand Up @@ -199,8 +199,10 @@ void SVGGraphicsElement::didAttachRenderers()
{
#if ENABLE(LAYER_BASED_SVG_ENGINE)
if (document().settings().layerBasedSVGEngineEnabled()) {
if (auto* svgRenderer = dynamicDowncast<RenderLayerModelObject>(renderer()); svgRenderer && lineageOfType<RenderSVGHiddenContainer>(*svgRenderer).first())
svgRenderer->layer()->dirtyVisibleContentStatus();
if (auto* svgRenderer = dynamicDowncast<RenderLayerModelObject>(renderer()); svgRenderer && lineageOfType<RenderSVGHiddenContainer>(*svgRenderer).first()) {
if (auto* layer = svgRenderer->layer())
layer->dirtyVisibleContentStatus();
}
}
#endif
}
Expand Down

0 comments on commit d05d7a2

Please sign in to comment.