Skip to content

Commit 349cf15

Browse files
Dileep Siva Sai Nallabothumeta-codesync[bot]
authored andcommitted
Fixing fb4a crashes due to null pointer exception (#55529)
Summary: [Android][Fixed] - Fix null pointer crash in FabricUIManagerBinding::driveCxxAnimations by adding null check for scheduler Pull Request resolved: #55529 Crash failures during e2e: https://www.internalfb.com/intern/test/562949977559616 logview: https://fburl.com/logview/65na7gyr Reason: null dereference Pull Request resolved: #55529 Crash failures during e2e: https://www.internalfb.com/intern/test/562949977559616 logview: https://fburl.com/logview/65na7gyr Reason: null dereference Reviewed By: javache Differential Revision: D92986523 fbshipit-source-id: 2a193cdc93a44a59fedfb7974bb694546a2000f6
1 parent d7a1d08 commit 349cf15

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ void FabricUIManagerBinding::setPixelDensity(float pointScaleFactor) {
5252
}
5353

5454
void FabricUIManagerBinding::driveCxxAnimations() {
55-
getScheduler()->animationTick();
55+
auto scheduler = getScheduler();
56+
if (!scheduler) {
57+
LOG(ERROR)
58+
<< "FabricUIManagerBinding::driveCxxAnimations: scheduler disappeared";
59+
return;
60+
}
61+
scheduler->animationTick();
5662
}
5763

5864
void FabricUIManagerBinding::driveAnimationBackend(jdouble frameTimeMs) {

0 commit comments

Comments
 (0)