lodepng.c (lodepng_zlib_compress): Fix alloc fail check.

From https://github.com/lvandeve/lodepng/pull/118

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1646 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2019-11-11 09:37:06 +00:00
parent da43c6a57b
commit 8ebb9dc117

View file

@ -2123,7 +2123,7 @@ unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsig
if(!error) {
*outsize = deflatesize + 6;
*out = (unsigned char*)lodepng_malloc(*outsize);
if(!out) error = 83; /*alloc fail*/
if(!*out) error = 83; /*alloc fail*/
}
if(!error) {