diff --git a/OpenRA.Game/Traits/Selectable.cs b/OpenRA.Game/Traits/Selectable.cs index b2a4ffe058..2a8f95f485 100644 --- a/OpenRA.Game/Traits/Selectable.cs +++ b/OpenRA.Game/Traits/Selectable.cs @@ -161,7 +161,7 @@ namespace OpenRA.Traits var c = Color.Green; var wlr = Game.Renderer.WorldLineRenderer; - foreach (var stp in targets.Select(p => wr.ScreenPxPosition(p.CenterPosition))) + foreach (var stp in targets.Where(t => t.IsValid).Select(p => wr.ScreenPxPosition(p.CenterPosition))) { wlr.DrawLine(stp + new float2(-1, -1), stp + new float2(-1, 1), c, c); wlr.DrawLine(stp + new float2(-1, 1), stp + new float2(1, 1), c, c);