diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-06-25 19:32:34 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-06-25 20:19:59 -0500 |
commit | a582b8f840c4dad1148fee6f0e1f0486f28da5d9 (patch) | |
tree | 4951916ae3f8a0c39ca8c0ef305996daf909cbfd /example.c | |
parent | 5316f66005c19afb7f92bf45df253622b9c57bfd (diff) | |
download | libpng-a582b8f840c4dad1148fee6f0e1f0486f28da5d9.tar.gz |
[master] Imported from libpng-1.4.3.tarv1.4.3
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 |