Skip to content

Fix null crash when using maintainVisibleContentPosition on Android - #38891

Closed
janicduplessis wants to merge 1 commit into
react:mainfrom
janicduplessis:@janic/mvcp-null-fix
Closed

Fix null crash when using maintainVisibleContentPosition on Android#38891
janicduplessis wants to merge 1 commit into
react:mainfrom
janicduplessis:@janic/mvcp-null-fix

Conversation

@janicduplessis

Copy link
Copy Markdown
Contributor

Summary:

mFirstVisibleView is a weak ref so it can also be null when dereferencing.

This was reported on the original PR here #35049 (comment)

Changelog:

[ANDROID] [FIXED] - Fix null crash when using maintainVisibleContentPosition on Android

Test Plan:

Not sure exactly in what cases this can happen, but the fix is trivial and makes sense.

@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Aug 9, 2023
@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a8,876,543-18,897
androidhermesarmeabi-v7a7926730n/a
androidhermesx869273047n/a
androidhermesx86_649176673n/a
androidjscarm64-v8a9,473,033-13,997
androidjscarmeabi-v7a8416390n/a
androidjscx869455785n/a
androidjscx86_649771996n/a

Base commit: e14d27c
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions

Copy link
Copy Markdown

This pull request was successfully merged by @janicduplessis in 1a1a798.

When will my fix make it into a release? | Upcoming Releases

@github-actionsgithub-actionsBot added the Merged This PR has been merged. label Aug 10, 2023
fortmarek pushed a commit that referenced this pull request Sep 4, 2023
…38891)
Summary:
`mFirstVisibleView` is a weak ref so it can also be null when dereferencing.
This was reported on the original PR here #35049 (comment)
## Changelog:
[ANDROID] [FIXED] - Fix null crash when using maintainVisibleContentPosition on Android
Pull Request resolved: #38891
Test Plan: Not sure exactly in what cases this can happen, but the fix is trivial and makes sense.
Reviewed By: cortinico
Differential Revision: D48192154
Pulled By: rshest
fbshipit-source-id: 57a38a22a0e216a33603438355bde0013c014fbf
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.ContributorA React Native contributor.MergedThis PR has been merged.Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@janicduplessis@analysis-bot@facebook-github-bot@rshest