Index: trunk/psModules/src/pmSubtractBias.c
===================================================================
--- trunk/psModules/src/pmSubtractBias.c	(revision 2857)
+++ trunk/psModules/src/pmSubtractBias.c	(revision 2916)
@@ -6,6 +6,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 22:22:00 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-05 23:43:58 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -252,4 +252,17 @@
     PS_READOUT_CHECK_EMPTY(in, NULL);
     PS_READOUT_CHECK_TYPE(in, PS_TYPE_F32, NULL);
+
+    //
+    // If the overscans != NULL, then check the type of each image.
+    //
+    if (overscans != NULL) {
+        psListElem *tmpOverscan = (psListElem *) overscans->head;
+        while (NULL != tmpOverscan) {
+            psImage *myOverscanImage = (psImage *) tmpOverscan->data;
+            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
+            tmpOverscan = tmpOverscan->next;
+        }
+    }
+
     if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
         psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE).  Returning in image\n");
@@ -301,4 +314,7 @@
     }
 
+
+
+
     if (overScanAxis == PM_OVERSCAN_NONE) {
         if (fit != PM_FIT_NONE) {
@@ -322,9 +338,13 @@
     //
     // We subtract each overscan region from the image data.
+    // If we get here we know that overscans != NULL.
     //
+
     if (overScanAxis == PM_OVERSCAN_ALL) {
         tmpOverscan = (psListElem *) overscans->head;
         while (NULL != tmpOverscan) {
             myOverscanImage = (psImage *) tmpOverscan->data;
+
+            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
             psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff);
             if (rc == NULL) {
