diff --git a/src/rmodels.c b/src/rmodels.c index 46309f98..6e33da69 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5657,7 +5657,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;