Index: trunk/ppImage/src/ppImageRebinReadout.c
===================================================================
--- trunk/ppImage/src/ppImageRebinReadout.c	(revision 8751)
+++ trunk/ppImage/src/ppImageRebinReadout.c	(revision 10502)
@@ -61,6 +61,9 @@
 bool ppImageRebinReadout (pmReadout *output, pmReadout *input, pmFPAfile *outFile)
 {
-    psF32 value;
-    psS32 nPix;
+    PS_ASSERT_PTR_NON_NULL(output, false);
+    PS_ASSERT_IMAGE_NON_NULL(output->image, false);
+    PS_ASSERT_PTR_NON_NULL(input, false);
+    PS_ASSERT_IMAGE_NON_NULL(input->image, false);
+    PS_ASSERT_PTR_NON_NULL(outFile, false);
 
     // the binning process must not change the size of the output image...
@@ -78,6 +81,6 @@
     for (int yOut = 0; yOut < output->image->numRows; yOut++) {
         for (int xOut = 0; xOut < output->image->numCols; xOut++) {
-            value = 0;
-            nPix = 0;
+            float value = 0;
+            int nPix = 0;
             for (int yIn = yOut * dY; (yIn < yOut * dY + dY) && (yIn < nY); yIn ++) {
                 for (int xIn = xOut * dX; (xIn < xOut * dX + dX) && (xIn < nX); xIn ++) {
