mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Add #ifdef PNG_WRITE_FILTERED_ROW around a use of prev_row.
This commit is contained in:
parent
3e23f45ba9
commit
99343407e6
@ -3031,6 +3031,7 @@ png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
|
|||||||
|
|
||||||
png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH);
|
png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH);
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||||
/* Swap the current and previous rows */
|
/* Swap the current and previous rows */
|
||||||
if (png_ptr->prev_row != NULL)
|
if (png_ptr->prev_row != NULL)
|
||||||
{
|
{
|
||||||
@ -3040,6 +3041,7 @@ png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
|
|||||||
png_ptr->prev_row = png_ptr->row_buf;
|
png_ptr->prev_row = png_ptr->row_buf;
|
||||||
png_ptr->row_buf = tptr;
|
png_ptr->row_buf = tptr;
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_WRITE_FILTER_SUPPORTED */
|
||||||
|
|
||||||
/* Finish row - updates counters and flushes zlib if last row */
|
/* Finish row - updates counters and flushes zlib if last row */
|
||||||
png_write_finish_row(png_ptr);
|
png_write_finish_row(png_ptr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user