Skip to content

Commit

Permalink
Fix null noodle object
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Jul 9, 2024
1 parent 9f2c249 commit e56059a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Animation/PlayerTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void PlayerTrack::AssignTrack(Track* track, PlayerTrackObject object) {
auto& playerTrack = PlayerTrack::playerTracks[object];

auto instanceTrack = playerTrack && playerTrack.isAlive() ? playerTrack->track : nullptr;
GameObject* noodleObject = playerTrack ? playerTrack->origin->gameObject : nullptr;


if (instanceTrack && playerTrack) {
instanceTrack->RemoveGameObject(playerTrack->get_gameObject());
Expand Down Expand Up @@ -128,6 +128,8 @@ void PlayerTrack::AssignTrack(Track* track, PlayerTrackObject object) {
}
}

GameObject* noodleObject = playerTrack->origin->gameObject;

// this is only used in v2
playerTrack->set_enabled(track->v2);
playerTrack->track = track;
Expand Down

0 comments on commit e56059a

Please sign in to comment.