LibWeb/SVG: Don't crash when a filter has no valid effects

This commit is contained in:
Tim Ledbetter 2025-07-09 21:44:21 +01:00 committed by Jelle Raaijmakers
commit 438bb56160
Notes: github-actions[bot] 2025-07-09 22:19:33 +00:00
5 changed files with 17 additions and 4 deletions

View file

@ -653,7 +653,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
return;
if (auto* filter_element = as_if<SVG::SVGFilterElement>(*maybe_filter)) {
Optional<Gfx::Filter> new_filter = filter_element->gfx_filter();
auto new_filter = filter_element->gfx_filter();
if (!new_filter.has_value())
return;