Index: /trunk/psLib/src/image/psImageStats.c
===================================================================
--- /trunk/psLib/src/image/psImageStats.c	(revision 1954)
+++ /trunk/psLib/src/image/psImageStats.c	(revision 1955)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-05 01:03:11 $
+*  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-05 01:46:02 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -381,4 +381,20 @@
     //    }
 
+
+    // Check for null inputs
+    if (input == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageEvalPolynomial",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psImage_IMAGE_NULL);
+        return NULL;
+    }
+
+    if (coeffs == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageEvalPolynomial",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psImage_COEFF_NULL);
+        return NULL;
+    }
+
     // We scale the pixel positions to values
     // between -1.0 and 1.0
Index: /trunk/psLib/src/imageops/psImageStats.c
===================================================================
--- /trunk/psLib/src/imageops/psImageStats.c	(revision 1954)
+++ /trunk/psLib/src/imageops/psImageStats.c	(revision 1955)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-05 01:03:11 $
+*  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-05 01:46:02 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -381,4 +381,20 @@
     //    }
 
+
+    // Check for null inputs
+    if (input == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageEvalPolynomial",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psImage_IMAGE_NULL);
+        return NULL;
+    }
+
+    if (coeffs == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageEvalPolynomial",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psImage_COEFF_NULL);
+        return NULL;
+    }
+
     // We scale the pixel positions to values
     // between -1.0 and 1.0
