diff --git a/src/rtextures.c b/src/rtextures.c index 73769a90e..1a539b44d 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -457,7 +457,7 @@ Image LoadImageFromScreen(void) // Unload image from CPU memory (RAM) void UnloadImage(Image image) { - RL_FREE(image.data); + if (image.data != NULL) RL_FREE(image.data); } // Export image data to file