From 42fa79bcd8f678c9e392efba2d859bcca3074b0f Mon Sep 17 00:00:00 2001 From: Uneven Prankster <33995085+GithubPrankster@users.noreply.github.com> Date: Wed, 28 Jul 2021 00:54:20 -0300 Subject: [PATCH] Add meshes pointer check (thanks 630Studios!) --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models.c b/src/models.c index 828ee8b34..cac137926 100644 --- a/src/models.c +++ b/src/models.c @@ -2654,7 +2654,7 @@ BoundingBox GetModelBoundingBox(Model model) int meshCount = model.meshCount; BoundingBox bounds = { 0 }; - if (meshCount < 1) + if (meshCount < 1 || model.meshes == NULL) { // No mesh to compute bounds from return bounds;