-
Notifications
You must be signed in to change notification settings - Fork 991
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. |
.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: