diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java index 1dfeb478cb9..be91c29c23e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java @@ -124,11 +124,12 @@ public class MountingManager { }); } - /** Delete rootView and all children/ */ + /** Delete rootView and all children recursively. */ @UiThread public void deleteRootView(int reactRootTag) { - if (mTagToViewState.containsKey(reactRootTag)) { - dropView(mTagToViewState.get(reactRootTag).mView, true); + ViewState rootViewState = mTagToViewState.get(reactRootTag); + if (rootViewState != null && rootViewState.mView != null) { + dropView(rootViewState.mView, true); } }