From 129c890a28b50c2ce3820e3745f8c89c8833f02c Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 30 May 2018 00:06:23 +0200 Subject: [PATCH] Removed assert() Not used in raylib this mechanism --- src/textures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textures.c b/src/textures.c index df1fe368..0aac923f 100644 --- a/src/textures.c +++ b/src/textures.c @@ -814,13 +814,13 @@ void ImageFormat(Image *image, int newFormat) free(pixels); pixels = NULL; + // In case original image had mipmaps, generate mipmaps for formated image // NOTE: Original mipmaps are replaced by new ones, if custom mipmaps were used, they are lost if (image->mipmaps > 1) { image->mipmaps = 1; - assert(image->data != NULL); - ImageMipmaps(image); + if (image->data != NULL) ImageMipmaps(image); } } else TraceLog(LOG_WARNING, "Image data format is compressed, can not be converted");