Index: /trunk/psLib/src/imageops/psImageInterpolate.c
===================================================================
--- /trunk/psLib/src/imageops/psImageInterpolate.c	(revision 20757)
+++ /trunk/psLib/src/imageops/psImageInterpolate.c	(revision 20758)
@@ -7,6 +7,6 @@
  *  @author Paul Price, IfA
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-22 22:28:44 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-11-15 03:09:34 $
  *
  *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
@@ -427,5 +427,5 @@
 #define INTERPOLATE_RESULT() \
     psImageInterpolateStatus status = PS_INTERPOLATE_STATUS_ERROR; /* Status of interpolation */ \
-    *imageValue = sumImage / sumKernel; \
+    *imageValue = sumKernel > 0 ? sumImage / sumKernel : interp->badImage; \
     if (wantVariance) { \
         *varianceValue = sumVariance / (sumKernel2 - sumBad); \
