Browse Source

Fix #3221: ArgumentOutOfRangeException: Index was out of range when clearing the assembly list

pull/3283/head
Siegfried Pammer 1 year ago
parent
commit
46cac0f58c
  1. 5
      ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs

5
ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs

@ -658,8 +658,9 @@ namespace ICSharpCode.ILSpyX.TreeView @@ -658,8 +658,9 @@ namespace ICSharpCode.ILSpyX.TreeView
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;
}
}

Loading…
Cancel
Save