Index: trunk/psLib/src/imageops/psImageConvolve.h
===================================================================
--- trunk/psLib/src/imageops/psImageConvolve.h	(revision 14478)
+++ trunk/psLib/src/imageops/psImageConvolve.h	(revision 14705)
@@ -5,6 +5,6 @@
  * @author Robert DeSonia, MHPCC
  *
- * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-08-14 02:06:32 $
+ * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-08-30 20:32:17 $
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  */
@@ -25,6 +25,5 @@
 
 /// A convolution kernel
-typedef struct
-{
+typedef struct {
     psImage *image;                    ///< Kernel data, in the form of an image
     int xMin;                          ///< Most negative x index
@@ -34,6 +33,14 @@
     float **kernel;                    ///< Pointer to the kernel data
     float **p_kernelRows;              ///< Pointer to the rows of the kernel data; not intended for user use.
-}
-psKernel;
+} psKernel;
+
+#define PS_ASSERT_KERNEL_NON_NULL(KERNEL, RETURNVALUE) \
+    if ((NAME) == NULL || (NAME)->KERNEL == NULL) { \
+        psError(PS_ERR_BAD_PARAMETER_NULL, true, \
+                "Unallowable operation: psKernel %s or its data is NULL.", \
+                #NAME); \
+        return RETURNVALUE; \
+    } \
+    PS_ASSERT_IMAGE_NON_NULL((KERNEL)->image, RETURNVALUE);
 
 /// Allocates a convolution kernel of the given range
