From 64294cd2d2301637dcc01114bf6c60ed3759f8ad Mon Sep 17 00:00:00 2001 From: etkmao Date: Wed, 29 May 2024 17:08:08 +0800 Subject: [PATCH] fix(ios): animation nullptr crash --- dom/src/dom/animation/animation_manager.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dom/src/dom/animation/animation_manager.cc b/dom/src/dom/animation/animation_manager.cc index 66356b9979b..566c0379155 100644 --- a/dom/src/dom/animation/animation_manager.cc +++ b/dom/src/dom/animation/animation_manager.cc @@ -69,7 +69,9 @@ void AnimationManager::EmplaceNodeProp(const std::shared_ptr& node, con animation_nodes_map_.insert({animation_id, nodeIds}); } auto animation = GetAnimation(animation_id); - node->EmplaceStyleMap(prop, HippyValue(animation->GetStartValue())); + if (animation) { + node->EmplaceStyleMap(prop, HippyValue(animation->GetStartValue())); + } } void AnimationManager::ParseAnimation(const std::shared_ptr& node) {