Skip to content

Commit f3b71f4

Browse files
cortinicokelset
authored andcommitted
Fix a crash new app template when createRootView is invoked with null bundle (#36796)
Summary: Pull Request resolved: #36796 As the title says, this fixes a instacrash on template when `createRootView` is invoked with a bundle being null. The crash was happening as the parameter, despite being not used, is specified as `Bundle` and is not nullable. When the Java caller passes `null`, the app crashes. Changelog: [Android] [Fixed] - Fix a crash new app template when `createRootView` is invoked with null bundle Reviewed By: cipolleschi Differential Revision: D44668305 fbshipit-source-id: 1150ddac26f19765e7340878c8850d8462c6f3fd
1 parent c92bb3c commit f3b71f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactActivityDelegate.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ open class DefaultReactActivityDelegate(
4545
override fun createRootView(): ReactRootView =
4646
ReactRootView(context).apply { setIsFabric(fabricEnabled) }
4747

48-
override fun createRootView(bundle: Bundle): ReactRootView =
48+
override fun createRootView(bundle: Bundle?): ReactRootView =
4949
ReactRootView(context).apply { setIsFabric(fabricEnabled) }
5050
}

0 commit comments

Comments
 (0)