Update rmodels.c
resolves segfault with missing bone weights or bone IDs
This commit is contained in:
parent
7868d600f4
commit
130fb2a993
|
|
@ -2286,6 +2286,8 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mesh.boneWeights==NULL) || (mesh.boneIds==NULL)) continue; // skip if missing bone data, causes segfault without on some models
|
||||||
|
|
||||||
// Update all bones and boneMatrices of first mesh with bones.
|
// Update all bones and boneMatrices of first mesh with bones.
|
||||||
for (int boneId = 0; boneId < anim.boneCount; boneId++)
|
for (int boneId = 0; boneId < anim.boneCount; boneId++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user