Browse Source

Fix #1452: Avoid NullReferenceException when accessing SlotInfo property on the root node

pull/1464/head
Daniel Grunwald 7 years ago
parent
commit
52e6717faf
  1. 2
      ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs

2
ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs

@ -610,6 +610,8 @@ namespace ICSharpCode.Decompiler.IL @@ -610,6 +610,8 @@ namespace ICSharpCode.Decompiler.IL
/// </remarks>
public SlotInfo SlotInfo {
get {
if (parent == null)
return null;
Debug.Assert(parent.GetChild(this.ChildIndex) == this);
return parent.GetChildSlot(this.ChildIndex);
}

Loading…
Cancel
Save