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

Bug: Removing TabItems from a TabCollection throws NullReferenceException #313

Closed
minimalism opened this issue Apr 1, 2021 · 1 comment

Comments

@minimalism
Copy link
Contributor

To reproduce:

TabControl tabControl = new();
tabControl.Items.Add(new TabItem("Tab Item"));
tabControl.Items.Clear();
// tabControl.Items.RemoveAt(0); exhibits the same behavior

The setter on ListButton.IsPressed will throw when accessing Parent on line 20, which will be null at this point.
I believe the TabItem's Selector will have a Grid InternalChild, whose WidgetsOnCollectionChanged method will unset the Parent property.

@rds1983
Copy link
Owner

rds1983 commented Jun 5, 2021

Should be fixed.

@rds1983 rds1983 closed this as completed Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants