Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RCTPicker crash #12187

Closed
wants to merge 2 commits into from
Closed

Conversation

EngsShi
Copy link

@EngsShi EngsShi commented Feb 3, 2017

If user slide picker when picker item is zero, UIPickerViewDelegate will call pickerView:didSelectRow:inComponent row=0, _items[row][@"value"] will crash.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Feb 3, 2017
@mkonicek
Copy link
Contributor

mkonicek commented Feb 3, 2017

Thanks for the fix! Are you saying that row was 0 and _items.count was 0 (there were no items in the picker)? How can that happen? Can you provide a screenshot please of what that picker looks like?

@EngsShi
Copy link
Author

EngsShi commented Feb 4, 2017

@mkonicek Yes. row was 0 and _items.count was 0.

image
Right picker were no items.

@mkonicek
Copy link
Contributor

Ah so it happens when there are no items in the picker?

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Mar 14, 2017
@facebook-github-bot
Copy link
Contributor

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

@danielfttorres
Copy link

@EngsShi it's fix this #12829?

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. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants