Skip to content

Commit

Permalink
Try to avoid NRE in TreeSelectedItemsBase.
Browse files Browse the repository at this point in the history
  • Loading branch information
grokys committed Jul 2, 2024
1 parent a0da097 commit 7ff0fe3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public T? this[int index]
{
for (var i = range.Begin; i <= range.End; ++i)
{
yield return node.ItemsView![i];
if (node.ItemsView is not null)
yield return node.ItemsView[i];
}
}

Expand Down Expand Up @@ -110,4 +111,4 @@ public TreeSelectedItems(TreeSelectionModelBase<T> root) : base(root) { }
yield return i;
}
}
}
}

0 comments on commit 7ff0fe3

Please sign in to comment.