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

Fixing TabView null ref crash #6987

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Fixing TabView null ref crash #6987

merged 1 commit into from
Apr 18, 2022

Conversation

RBrid
Copy link
Contributor

@RBrid RBrid commented Apr 18, 2022

Just adding a null-ref check to avoid an occasional crash.

Internal bug is 38531928. We have had a few crashes where tvi is null. ContainerFromItem(SelectedItem()).try_aswinrt::TabViewItem() must be returning null. I don't know the exact circumstances, so do not have a new regression test. I just confirmed while debugging MuxControlsTestApp that using a null tvi results in the kind of crash reported.

This code was introduced recently with #6632.

@RBrid RBrid self-assigned this Apr 18, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 18, 2022
@RBrid RBrid requested a review from ojhad April 18, 2022 20:30
@RBrid
Copy link
Contributor Author

RBrid commented Apr 18, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ojhad ojhad added team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Apr 18, 2022
@RBrid RBrid merged commit e25a162 into main Apr 18, 2022
@RBrid RBrid deleted the user/regisb/TabViewNullRef1 branch April 18, 2022 23:25
kmahone pushed a commit that referenced this pull request May 4, 2022
@ghost
Copy link

ghost commented Jun 2, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220601001 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants