Skip to content

Commit 199b898

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Check nodesManager_ in AnimatedModule::executeOperation (#54518)
Summary: Pull Request resolved: #54518 ## Changelog: [General] [Fixed] - Check nodesManager_ in AnimatedModule::executeOperation AnimatedModule::executeOperation might be scheduled on ui thread right before nodesManager_ is destroyed Reviewed By: andrewdacenko Differential Revision: D86868462 fbshipit-source-id: 9ad737b05070431369c1a7a78d4477d060bee589
1 parent 1e16910 commit 199b898

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-native/ReactCommon/react/renderer/animated/AnimatedModule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ void AnimatedModule::queueAndExecuteBatchedOperations(
221221
}
222222

223223
void AnimatedModule::executeOperation(const Operation& operation) {
224+
if (nodesManager_ == nullptr) {
225+
return;
226+
}
224227
std::visit(
225228
[&](const auto& op) {
226229
using T = std::decay_t<decltype(op)>;

0 commit comments

Comments
 (0)