Skip to content

Commit 0fc4b61

Browse files
VitoTringoloVito Tringolo
and
Vito Tringolo
authored
LoadBoneInfoGLTF add check for animation name being NULL (#4053)
Co-authored-by: Vito Tringolo <[email protected]>
1 parent c636618 commit 0fc4b61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rmodels.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4864,7 +4864,7 @@ static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, int *boneCount)
48644864
for (unsigned int i = 0; i < skin.joints_count; i++)
48654865
{
48664866
cgltf_node node = *skin.joints[i];
4867-
strncpy(bones[i].name, node.name, sizeof(bones[i].name));
4867+
if (node.name != NULL) strncpy(bones[i].name, node.name, sizeof(bones[i].name));
48684868

48694869
// Find parent bone index
48704870
unsigned int parentIndex = -1;

0 commit comments

Comments
 (0)