diff --git a/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs b/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs index e5a3834047..496b3a6a28 100644 --- a/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs +++ b/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs @@ -42,6 +42,9 @@ namespace OpenRA.Mods.Cnc.Traits bool IsValidVeinNeighbour(CPos cell, CPos neighbour) { + if (!Map.Contains(neighbour)) + return false; + // Cell is automatically valid if it contains a veinhole actor if (actorLayer.PreviewsAt(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name))) return true;