From 01e2ea24da1af193e3c3cdf4338f6f75c3ecbb34 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Tue, 11 Feb 2020 15:43:35 +0500 Subject: [PATCH] engine: common: imagelib: img_png.c: add a missing return statement. --- engine/common/imagelib/img_png.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/common/imagelib/img_png.c b/engine/common/imagelib/img_png.c index 1e80c582..c3746999 100644 --- a/engine/common/imagelib/img_png.c +++ b/engine/common/imagelib/img_png.c @@ -204,6 +204,7 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi { Con_DPrintf( S_ERROR "Image_LoadPNG: IEND chunk has wrong size (%s)\n", name ); Mem_Free( idat_buf ); + return false; } if( oldsize == 0 ) @@ -414,9 +415,11 @@ qboolean Image_SavePNG( const char *name, rgbdata_t *pix ) if( FS_FileExists( name, false ) && !Image_CheckFlag( IL_ALLOW_OVERWRITE )) return false; // already existed + // bogus parameter check if( !pix->buffer ) return false; + // get image description switch( pix->type ) { case PF_RGB_24: