Skip to content

Avoid null reference exception when fetching ReactRootView in bridgeless#47284

Closed
rozele wants to merge 1 commit into
facebook:mainfrom
rozele:export-D65141137
Closed

Avoid null reference exception when fetching ReactRootView in bridgeless#47284
rozele wants to merge 1 commit into
facebook:mainfrom
rozele:export-D65141137

Conversation

@rozele
Copy link
Copy Markdown
Contributor

@rozele rozele commented Oct 29, 2024

Summary:
If the surface hasn't been set up yet, attempting to fetch the ReactRootView will throw a null reference exception. Since the result is already nullable, it's perhaps better to just return null when the surface has not yet been initialized.

Changelog

[Android][Fixed] Avoid null reference exception in bridgeless ReactDelegate

Differential Revision: D65141137

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 29, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D65141137

…ess (facebook#47284)

Summary:

If the surface hasn't been set up yet, attempting to fetch the ReactRootView will throw a null reference exception. Since the result is already nullable, it's perhaps better to just return null when the surface has not yet been initialized.

## Changelog

[Android][Fixed] Avoid null reference exception in bridgeless ReactDelegate

Differential Revision: D65141137
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D65141137

rozele added a commit to rozele/react-native-macos that referenced this pull request Oct 29, 2024
…in bridgeless (facebook#47284)

Summary:

If the surface hasn't been set up yet, attempting to fetch the ReactRootView will throw a null reference exception. Since the result is already nullable, it's perhaps better to just return null when the surface has not yet been initialized.

## Changelog

[Android][Fixed] Avoid null reference exception in bridgeless ReactDelegate

Differential Revision: D65141137
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 0d66410.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 29, 2024
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rozele in 0d66410

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants