From e2996f167ede62b38cc280a46a8dceb6b5bcd01e Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 25 Apr 2023 20:01:26 +0200 Subject: [PATCH] Update rtextures.c --- src/rtextures.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rtextures.c b/src/rtextures.c index d83d11e5a..5e39260e2 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;