Check before freeing image.data

This commit is contained in:
Antonis Geralis 2021-12-24 12:38:07 +02:00 committed by GitHub
parent f66ae2366f
commit b500241ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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