Skip to content

Commit

Permalink
LoadBoneInfoGLTF add check for animation name being NULL (#4053)
Browse files Browse the repository at this point in the history
Co-authored-by: Vito Tringolo <vito.tringolo@recognitionrobotics.com>
  • Loading branch information
VitoTringolo and Vito Tringolo committed Jun 11, 2024
1 parent c636618 commit 0fc4b61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -4864,7 +4864,7 @@ static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, int *boneCount)
for (unsigned int i = 0; i < skin.joints_count; i++)
{
cgltf_node node = *skin.joints[i];
strncpy(bones[i].name, node.name, sizeof(bones[i].name));
if (node.name != NULL) strncpy(bones[i].name, node.name, sizeof(bones[i].name));

// Find parent bone index
unsigned int parentIndex = -1;
Expand Down

0 comments on commit 0fc4b61

Please sign in to comment.