summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-04-25 20:01:26 +0200
committerRay <[email protected]>2023-04-25 20:01:26 +0200
commite2996f167ede62b38cc280a46a8dceb6b5bcd01e (patch)
treed8a4a6cd1319ca3e43a38853ca159c37a714a608 /src
parent64f2f86d325a46856c9f5b6fb28b32a0ad9d5abd (diff)
downloadraylib-e2996f167ede62b38cc280a46a8dceb6b5bcd01e.tar.gz
raylib-e2996f167ede62b38cc280a46a8dceb6b5bcd01e.zip
Update rtextures.c
Diffstat (limited to 'src')
-rw-r--r--src/rtextures.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index d83d11e5..5e39260e 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -525,6 +525,8 @@ bool ExportImage(Image image, const char *fileName)
{
int success = 0;
+ if ((image.width == 0) || (image.height == 0) || (image.data == NULL)) return success;
+
#if defined(SUPPORT_IMAGE_EXPORT)
int channels = 4;
bool allocatedData = false;