Revert NullReferenceException change in IntervalTree.cs

* Not technically needed because newNode.Parent is the same value as parent
This commit is contained in:
KeatonTheBot 2025-09-30 17:53:09 -05:00
parent 51b32981b6
commit 0487b781dc

View file

@ -316,16 +316,13 @@ namespace ARMeilleure.Translation
{ {
_root = newNode; _root = newNode;
} }
else if (parent != null && start.CompareTo(parent.Start) < 0) else if (start.CompareTo(parent.Start) < 0)
{ {
parent.Left = newNode; parent.Left = newNode;
} }
else else
{ {
if (parent != null) parent.Right = newNode;
{
parent.Right = newNode;
}
} }
PropagateIncrease(newNode); PropagateIncrease(newNode);