diff --git a/OpenRA.Mods.Common/Traits/Parent/HasParent.cs b/OpenRA.Mods.Common/Traits/Parent/HasParent.cs index 01128314e3e9..bb8b5edb49a5 100644 --- a/OpenRA.Mods.Common/Traits/Parent/HasParent.cs +++ b/OpenRA.Mods.Common/Traits/Parent/HasParent.cs @@ -32,7 +32,8 @@ public HasParent(ActorInitializer init) void ITransformActorInitModifier.ModifyTransformActorInit(Actor self, TypeDictionary init) { - init.Add(new ParentActorInit(Parent)); + if (Parent != null) + init.Add(new ParentActorInit(Parent)); } } }