diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java index 6a94f1e8b0e790..66f11b1a873c90 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java @@ -1092,6 +1092,12 @@ public void printSurfaceState() { public void enqueuePendingEvent(int reactTag, ViewEvent viewEvent) { UiThreadUtil.assertOnUiThread(); + // When the surface stopped we will reset the view state map. We are not going to enqueue + // pending events as they are not expected to be dispatched anyways. + if (mTagToViewState == null) { + return; + } + ViewState viewState = mTagToViewState.get(reactTag); if (viewState == null) { // Cannot queue event without view state. Do nothing here.