[rmodels] Fix crash when NULL is passed to LoadImageFromCgltfImage (#4563)

This commit is contained in:
Caleb Heydon
2024-12-02 07:35:54 -05:00
committed by GitHub
parent e5e2bc83c3
commit f3f5f38c0f

View File

@@ -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) &&