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 9, 2024
1 parent 29ac31f commit a5224f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -4864,7 +4864,9 @@ 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 a5224f6

Please sign in to comment.