Skip to content

Commit

Permalink
Fix memory leak / infinite loop when traversing a damaging warp point (
Browse files Browse the repository at this point in the history
  • Loading branch information
ekolis committed Apr 20, 2022
1 parent c199387 commit 75e4887
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FrEee/Game/Objects/Orders/WarpOrder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FrEee.Game.Enumerations;
using FrEee.Game.Enumerations;
using FrEee.Game.Interfaces;
using FrEee.Game.Objects.Civilization;
using FrEee.Game.Objects.LogMessages;
Expand Down Expand Up @@ -120,6 +120,7 @@ public void Execute(IOrderable ord)
if (sobj.IsDestroyed)
{
sobj.Owner.Log.Add(sobj.CreateLogMessage(sobj + " was destroyed by turbulence when traversing " + WarpPoint + ".", LogMessageType.Generic));
IsComplete = true;
return;
}
else
Expand Down Expand Up @@ -169,4 +170,4 @@ public override string ToString()
return "Warp via " + WarpPoint.Name + " in " + WarpPoint.FindStarSystem();
}
}
}
}

0 comments on commit 75e4887

Please sign in to comment.