diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 983763385ad2a0..6e1d552a6a00d7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -445,12 +445,18 @@ public void invalidate() { @Override public void markActiveTouchForTag(int surfaceId, int reactTag) { - mMountingManager.getSurfaceManager(surfaceId).markActiveTouchForTag(reactTag); + SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(surfaceId); + if (surfaceMountingManager != null) { + surfaceMountingManager.markActiveTouchForTag(reactTag); + } } @Override public void sweepActiveTouchForTag(int surfaceId, int reactTag) { - mMountingManager.getSurfaceManager(surfaceId).sweepActiveTouchForTag(reactTag); + SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(surfaceId); + if (surfaceMountingManager != null) { + surfaceMountingManager.sweepActiveTouchForTag(reactTag); + } } /**