mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ue4] Null check for track entry at specific index. Closes #1548.
This commit is contained in:
parent
9d2353bc46
commit
8362074681
@ -265,7 +265,7 @@ UTrackEntry* USpineSkeletonAnimationComponent::AddEmptyAnimation (int trackIndex
|
||||
|
||||
UTrackEntry* USpineSkeletonAnimationComponent::GetCurrent (int trackIndex) {
|
||||
CheckState();
|
||||
if (state) {
|
||||
if (state && state->getCurrent(trackIndex)) {
|
||||
TrackEntry* entry = state->getCurrent(trackIndex);
|
||||
if (entry->getRendererObject()) {
|
||||
return (UTrackEntry*)entry->getRendererObject();
|
||||
|
||||
@ -436,7 +436,7 @@ UTrackEntry* USpineWidget::AddEmptyAnimation(int trackIndex, float mixDuration,
|
||||
|
||||
UTrackEntry* USpineWidget::GetCurrent(int trackIndex) {
|
||||
CheckState();
|
||||
if (state) {
|
||||
if (state && state->getCurrent(trackIndex)) {
|
||||
TrackEntry* entry = state->getCurrent(trackIndex);
|
||||
if (entry->getRendererObject()) {
|
||||
return (UTrackEntry*)entry->getRendererObject();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user