Fixed write to access to nullptr when animation has no normals

This commit is contained in:
MrDiver 2021-08-29 04:41:33 +02:00
parent 19114c2efd
commit c97e69fea3

View File

@ -1636,9 +1636,11 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
model.meshes[m].animVertices[vCounter + 1] = 0;
model.meshes[m].animVertices[vCounter + 2] = 0;
model.meshes[m].animNormals[vCounter] = 0;
model.meshes[m].animNormals[vCounter + 1] = 0;
model.meshes[m].animNormals[vCounter + 2] = 0;
if(model.meshes[m].animNormals!=NULL){
model.meshes[m].animNormals[vCounter] = 0;
model.meshes[m].animNormals[vCounter + 1] = 0;
model.meshes[m].animNormals[vCounter + 2] = 0;
}
for (int j = 0; j < 4; j++)
{