Skip to content

Commit

Permalink
Fix : null pointer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
seker committed Dec 23, 2024
1 parent 757e3c5 commit 248e367
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/gltfio/src/Animator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ void AnimatorImpl::addChannels(const FixedCapacityVector<Entity>& nodeMap,
const Sampler* samplers = dst.samplers.data();
for (cgltf_size j = 0, nchans = srcAnim.channels_count; j < nchans; ++j) {
const cgltf_animation_channel& srcChannel = srcChannels[j];
if (!srcChannel.target_node) {
continue;
}
Entity targetEntity = nodeMap[srcChannel.target_node - nodes];
if (UTILS_UNLIKELY(!targetEntity)) {
if (GLTFIO_VERBOSE) {
Expand Down

0 comments on commit 248e367

Please sign in to comment.