mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ue] Closes #2557, dereference UTrackEntry in TrackEntries
This commit is contained in:
parent
ed0206dde3
commit
0fd206d3ca
@ -35,6 +35,7 @@
|
|||||||
using namespace spine;
|
using namespace spine;
|
||||||
|
|
||||||
void UTrackEntry::SetTrackEntry(TrackEntry *trackEntry) {
|
void UTrackEntry::SetTrackEntry(TrackEntry *trackEntry) {
|
||||||
|
if (entry) entry->setRendererObject(nullptr);
|
||||||
this->entry = trackEntry;
|
this->entry = trackEntry;
|
||||||
if (entry) entry->setRendererObject((void *) this);
|
if (entry) entry->setRendererObject((void *) this);
|
||||||
}
|
}
|
||||||
@ -80,6 +81,11 @@ USpineSkeletonAnimationComponent::USpineSkeletonAnimationComponent() {
|
|||||||
|
|
||||||
void USpineSkeletonAnimationComponent::BeginPlay() {
|
void USpineSkeletonAnimationComponent::BeginPlay() {
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
for (UTrackEntry* entry : trackEntries) {
|
||||||
|
if (entry && entry->GetTrackEntry()) {
|
||||||
|
entry->GetTrackEntry()->setRendererObject(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
trackEntries.Empty();
|
trackEntries.Empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,11 @@ void USpineWidget::SynchronizeProperties() {
|
|||||||
} else {
|
} else {
|
||||||
slateWidget->SetData(nullptr);
|
slateWidget->SetData(nullptr);
|
||||||
}
|
}
|
||||||
|
for (UTrackEntry* entry : trackEntries) {
|
||||||
|
if (entry && entry->GetTrackEntry()) {
|
||||||
|
entry->GetTrackEntry()->setRendererObject(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
trackEntries.Empty();
|
trackEntries.Empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user