summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorVitoTringolo <[email protected]>2024-06-11 11:50:42 +0200
committerGitHub <[email protected]>2024-06-11 11:50:42 +0200
commit0fc4b619065291a06787fe38388d1318f7ecfc12 (patch)
tree5e8e20f7d7cc990927cb21465ec6904993274053 /src
parentc636618d777053d1a2b968c1aa76e8e06190f29e (diff)
downloadraylib-0fc4b619065291a06787fe38388d1318f7ecfc12.tar.gz
raylib-0fc4b619065291a06787fe38388d1318f7ecfc12.zip
LoadBoneInfoGLTF add check for animation name being NULL (#4053)
Co-authored-by: Vito Tringolo <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/rmodels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rmodels.c b/src/rmodels.c
index 14cfc64a..1ee27602 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -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;