mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
lodepng.c (lodepng_encode): check for preProcessScanlines() errors.
(patch by 'yoch', from https://github.com/lvandeve/lodepng/pull/66) git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1553 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
ae38737ada
commit
77a45cbbbe
1 changed files with 8 additions and 2 deletions
|
@ -5677,10 +5677,16 @@ unsigned lodepng_encode(unsigned char** out, size_t* outsize,
|
||||||
{
|
{
|
||||||
state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h);
|
state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h);
|
||||||
}
|
}
|
||||||
if(!state->error) preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder);
|
if(!state->error)
|
||||||
|
{
|
||||||
|
state->error = preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder);
|
||||||
|
}
|
||||||
lodepng_free(converted);
|
lodepng_free(converted);
|
||||||
}
|
}
|
||||||
else preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder);
|
else
|
||||||
|
{
|
||||||
|
state->error = preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* output all PNG chunks */
|
/* output all PNG chunks */
|
||||||
|
|
Loading…
Reference in a new issue