Since parentOrPseudoHostElement can return a nullptr, we need to check for that before trying to access the renderer() of the Element object it returns.
<rdar://problem/86518846>
Created attachment 447305 [details] Patch
Comment on attachment 447305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447305&action=review > Source/WebCore/ChangeLog:11 > + Since parentOrPseudoHostElement can return a nullptr, we need to check for nullptr before trying to > + access the renderer() of the Element pointer it returns. Could you explain why parentOrPseudoHostElement() returns nullptr in here? > Source/WebCore/rendering/RenderCounter.cpp:315 > + auto parent = parentOrPseudoHostElement(*currentRenderer); I'd write it like auto* parent = parentOrPseudoHostElement(*currentRenderer);
Created attachment 447372 [details] Patch
Committed r287194 (245361@main): <https://commits.webkit.org/245361@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447372 [details].