Skip to content

Commit

Permalink
add null check for DefaultRoot (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuokamoto authored and web-flow committed Dec 28, 2023
1 parent a0e267f commit 5e78f68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void ARRBaseRobot::SetBaseMeshComp(UMeshComponent* InBaseMeshComp, bool bInMakeA
DefaultRoot->DestroyComponent();
DefaultRoot = nullptr;
}
else
else if (IsValid(DefaultRoot))
{
// Cannot remove [DefaultRoot] in ctor thus to be done later in [PreInitializeComponents()]
DefaultRoot->AttachToComponent(InBaseMeshComp, FAttachmentTransformRules::KeepRelativeTransform);
Expand Down

0 comments on commit 5e78f68

Please sign in to comment.