diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-06-18 18:25:53 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-06-25 20:20:04 -0500 |
commit | 8361f64dbf0569357b2b08239a5173e9e1c68a84 (patch) | |
tree | d944c5ba89fd803ee60523c4bc6297d0fab56d17 /example.c | |
parent | 2a6227941e70971a7ee5904b2d52e8165b515180 (diff) | |
download | libpng-8361f64dbf0569357b2b08239a5173e9e1c68a84.tar.gz |
[master] Imported from libpng-1.4.3beta02.tarv1.4.3beta02
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -512,20 +512,17 @@ row_callback(png_structp png_ptr, png_bytep new_row, * shown below: */ - /* Check if row_num is in bounds. */ - if ((row_num >= 0) && (row_num < height)) - { - /* Get pointer to corresponding row in our - * PNG read buffer. - */ - png_bytep old_row = ((png_bytep *)our_data)[row_num]; - - /* If both rows are allocated then copy the new row - * data to the corresponding row data. - */ - if ((old_row != NULL) && (new_row != NULL)) - png_progressive_combine_row(png_ptr, old_row, new_row); - } + /* Get pointer to corresponding row in our + * PNG read buffer. + */ + png_bytep old_row = ((png_bytep *)our_data)[row_num]; + + /* If both rows are allocated then copy the new row + * data to the corresponding row data. + */ + if ((old_row != NULL) && (new_row != NULL)) + png_progressive_combine_row(png_ptr, old_row, new_row); + /* * The rows and passes are called in order, so you don't really * need the row_num and pass, but I'm supplying them because it |