Skip to content

Commit

Permalink
Fix #3221: ArgumentOutOfRangeException: Index was out of range when c…
Browse files Browse the repository at this point in the history
…learing the assembly list
  • Loading branch information
siegfriedpammer committed Sep 20, 2024
1 parent d8cfb8e commit 46cac0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,9 @@ public virtual void Drop(IPlatformDragEventArgs e, int index)

public bool IsLast {
get {
return Parent == null ||
Parent.Children[Parent.Children.Count - 1] == this;
return Parent == null
|| Parent.Children.Count == 0
|| Parent.Children[^1] == this;
}
}

Expand Down

0 comments on commit 46cac0f

Please sign in to comment.