A customer reported a NullReferenceException in TreeSelectedItemsBase:
Unexpected error: Object reference not set to an instance of an object.
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.EnumerateNode(TreeSelectionNode`1 node)+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItemsBase`1.GetEnumerator()+MoveNext()
at Avalonia.Controls.Selection.TreeSelectedItems`1.System.Collections.Generic.IEnumerable<System.Object>.GetEnumerator()+MoveNext()
The only thing that looks suspect is this ! operator in EnumerateNode. This PR puts a null check around that indexer instead of ignoring the null warning.
A customer reported a
NullReferenceException
inTreeSelectedItemsBase
:The only thing that looks suspect is this
!
operator inEnumerateNode
. This PR puts a null check around that indexer instead of ignoring the null warning.