Skip to content

Commit

Permalink
add null check for DefaultRoot (#245) (#247)
Browse files Browse the repository at this point in the history
Co-authored-by: yuokamoto <[email protected]>
  • Loading branch information
github-actions[bot] and yuokamoto authored Dec 28, 2023
1 parent 2628800 commit f8ef47e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ void ARRBaseRobot::SetBaseMeshComp(UMeshComponent* InBaseMeshComp, bool bInMakeA
DefaultRoot->DestroyComponent();
DefaultRoot = nullptr;
}
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 f8ef47e

Please sign in to comment.