Skip to content

Commit

Permalink
Merge pull request #155 from dnqbob/null-ck
Browse files Browse the repository at this point in the history
Fix a null check on HasParent
  • Loading branch information
MustaphaTR authored May 21, 2024
2 parents ee0a738 + 41099cc commit ee5ed72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OpenRA.Mods.Common/Traits/Parent/HasParent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}

0 comments on commit ee5ed72

Please sign in to comment.