diff --git a/src/rmodels.c b/src/rmodels.c index 5e6d3966..46309f98 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5060,6 +5060,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) &&