-
Notifications
You must be signed in to change notification settings - Fork 992
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
Null Reference Exception: System.Windows.Forms.TabControl.<WmSelChange> #12661
Comments
winforms/src/System.Windows.Forms/src/System/Windows/Forms/Controls/TabControl/TabControl.cs Lines 1948 to 1971 in 8d96e56
Maybe we need to change the code to do a null check on the SelectedTab?.TabAccessibilityObject @Olina-Zhang can your team test the issue please? |
@elachlan I tried your suggestion to do a null check on the testresult.mp4 |
@StuB-85 - thank you for reporting this issue! Do you require this fix in NET8? @elachlan - thank you for jumping on this bug! @John-Qiao - thank you, please go ahead with the PR, and add a unit test based on the customer project. Also please add to the bug description what versions this repros on, if this is a regression and what change had introduced it, this info will help with the servicing decision. Please work with @LeafShi1's team while the Redmond team is on the holidays. |
@Tanya-Solyanik this issue occurs in .NET 6.0, 7.0, 8.0, 9.0 and latest .NET 10.0 SDK, created a PR:12683 to fix it. |
@Tanya-Solyanik Yes I do require the fix in .Net 8. Thanks! |
.NET version
.NET 8.0
SDK: 8.0.403
RUNTIME: 8.0.10
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No response
Issue description
TabControl crashes due to null reference exception. This can occur after all tabs are removed while TabControl.AccessibilityObject is not null.
Steps to reproduce
WmSelIssue.zip
The text was updated successfully, but these errors were encountered: