Skip to content

Commit

Permalink
[rmodels] Fix crash when NULL is passed to LoadImageFromCgltfImage (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebHeydon authored Dec 2, 2024
1 parent e5e2bc8 commit f3f5f38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit f3f5f38

Please sign in to comment.