[rmodels] Fix crash when NULL is passed to LoadImageFromCgltfImage

This commit is contained in:
Caleb Heydon 2024-11-30 21:50:41 -05:00
parent 58fe34d9cc
commit e050feffc2

View File

@ -5069,6 +5069,8 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
{
Image image = { 0 };
if (cgltfImage == NULL) return image;
if (cgltfImage->uri != NULL) // Check if image data is provided as an uri (base64 or path)
{
if ((strlen(cgltfImage->uri) > 5) &&