From 390ce391ccbcd7b72806c45cd227014b02030ab1 Mon Sep 17 00:00:00 2001 From: Caleb Heydon Date: Sat, 30 Nov 2024 22:19:08 -0500 Subject: [PATCH] [rmodels] Fixed null pointer dereference in LoadGLTF --- src/rmodels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rmodels.c b/src/rmodels.c index 05ad8083c..8e85f734d 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -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;