Skip to content

Commit

Permalink
LoadBoneInfoGLTF add check for animation name being NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Vito Tringolo committed Jun 11, 2024
1 parent 29ac31f commit 00d7e8c
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 00d7e8c

Please sign in to comment.