mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-20 02:08:14 +00:00
[rmodels] Fixed null pointer dereference in LoadGLTF (#4564)
* [rmodels] Fixed null pointer dereference in LoadGLTF * [rmodels] Add parenthesis around conditionals in LoadGLTF
This commit is contained in:
@@ -5657,7 +5657,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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user