summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-06-25 19:32:34 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2010-06-25 20:19:59 -0500
commita582b8f840c4dad1148fee6f0e1f0486f28da5d9 (patch)
tree4951916ae3f8a0c39ca8c0ef305996daf909cbfd /example.c
parent5316f66005c19afb7f92bf45df253622b9c57bfd (diff)
downloadlibpng-a582b8f840c4dad1148fee6f0e1f0486f28da5d9.tar.gz
[master] Imported from libpng-1.4.3.tarv1.4.3
Diffstat (limited to 'example.c')
-rw-r--r--example.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/example.c b/example.c
index 90c9c5cd3..d7391734d 100644
--- a/example.c
+++ b/example.c
@@ -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