Browse Source

[rmodels] Fixed null pointer dereference in LoadGLTF

pull/4564/head
Caleb Heydon 4 months ago
parent
commit
390ce391cc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/rmodels.c

+ 1
- 1
src/rmodels.c View File

@ -5664,7 +5664,7 @@ static Model LoadGLTF(const char *fileName)
} }
// Load primitive indices data (if provided) // 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; cgltf_accessor *attribute = mesh->primitives[p].indices;

Loading…
Cancel
Save