Merge branch '3.8' into 3.9-beta

This commit is contained in:
badlogic 2019-10-09 14:48:32 +02:00
commit cc840910ce
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ void USpineBoneDriverComponent::BeginPlay () {
}
void USpineBoneDriverComponent::BeforeUpdateWorldTransform(USpineSkeletonComponent* skeleton) {
if (skeleton == lastBoundComponent) {
if (skeleton == lastBoundComponent && skeleton) {
if (UseComponentTransform) {
skeleton->SetBoneWorldPosition(BoneName, GetComponentLocation());
}
@ -56,7 +56,7 @@ void USpineBoneDriverComponent::TickComponent (float DeltaTime, ELevelTick TickT
if (Target) {
USpineSkeletonComponent* skeleton = static_cast<USpineSkeletonComponent*>(Target->GetComponentByClass(USpineSkeletonComponent::StaticClass()));
if (skeleton != lastBoundComponent) {
if (skeleton != lastBoundComponent && skeleton) {
// if (lastBoundComponent) lastBoundComponent->BeforeUpdateWorldTransform.RemoveAll(this);
if (!skeleton->BeforeUpdateWorldTransform.GetAllObjects().Contains(this))
skeleton->BeforeUpdateWorldTransform.AddDynamic(this, &USpineBoneDriverComponent::BeforeUpdateWorldTransform);