Add meshes pointer check (thanks 630Studios!)

This commit is contained in:
Uneven Prankster 2021-07-28 00:54:20 -03:00
parent a8329d90bb
commit 42fa79bcd8

View File

@ -2654,7 +2654,7 @@ BoundingBox GetModelBoundingBox(Model model)
int meshCount = model.meshCount; int meshCount = model.meshCount;
BoundingBox bounds = { 0 }; BoundingBox bounds = { 0 };
if (meshCount < 1) if (meshCount < 1 || model.meshes == NULL)
{ {
// No mesh to compute bounds from // No mesh to compute bounds from
return bounds; return bounds;