From 53c02eb2b97f5b8d62e667307c997483fc65e70c Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 15 Sep 2020 22:59:32 +0200 Subject: [PATCH] Fix a crash in the Move activity --- OpenRA.Mods.Common/Activities/Move/Move.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Activities/Move/Move.cs b/OpenRA.Mods.Common/Activities/Move/Move.cs index 56ad2d55b4..065814a662 100644 --- a/OpenRA.Mods.Common/Activities/Move/Move.cs +++ b/OpenRA.Mods.Common/Activities/Move/Move.cs @@ -376,7 +376,8 @@ namespace OpenRA.Mods.Common.Activities public override IEnumerable TargetLineNodes(Actor self) { - if (targetLineColor != null) + // destination might be initialized with null, but will be set in a subsequent tick + if (targetLineColor != null && destination != null) yield return new TargetLineNode(Target.FromCell(self.World, destination.Value), targetLineColor.Value); }