[rmodels] Fixed null pointer dereference in LoadGLTF
This commit is contained in:
parent
58fe34d9cc
commit
390ce391cc
|
|
@ -5664,7 +5664,7 @@ static Model LoadGLTF(const char *fileName)
|
|||
}
|
||||
|
||||
// Load primitive indices data (if provided)
|
||||
if (mesh->primitives[p].indices != NULL)
|
||||
if (mesh->primitives[p].indices != NULL && mesh->primitives[p].indices->buffer_view != NULL)
|
||||
{
|
||||
cgltf_accessor *attribute = mesh->primitives[p].indices;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user