From a2ab3769f4742a7c1e28963418ad24ecd0da665a Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Sun, 22 Dec 2024 21:29:02 -0500 Subject: [PATCH] LibWeb/CSS: Don't assume that animations have an associated effect ... when computing properties. --- Libraries/LibWeb/CSS/StyleComputer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index 5ebe8982025..e1bd2e8501c 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -1125,6 +1125,9 @@ void StyleComputer::collect_animation_into(DOM::Element& element, Optional(*animation.effect()); Optional duration; @@ -2410,7 +2413,8 @@ GC::Ref StyleComputer::compute_properties(DOM::Element& elem animation->play().release_value_but_fixme_should_propagate_errors(); } else { // The animation hasn't changed, but some properties of the animation may have - apply_animation_properties(m_document, cascaded_properties, *element.cached_animation_name_animation(pseudo_element)); + if (auto animation = element.cached_animation_name_animation(pseudo_element); animation) + apply_animation_properties(m_document, cascaded_properties, *animation); } } } else {