Index: trunk/psLib/src/math/psVectorSmooth.c
===================================================================
--- trunk/psLib/src/math/psVectorSmooth.c	(revision 15959)
+++ trunk/psLib/src/math/psVectorSmooth.c	(revision 31660)
@@ -30,5 +30,5 @@
     if (output == input) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot smooth vector in-place.");
-        return false;
+        return NULL;
     }
 
@@ -38,4 +38,9 @@
     long Nbin = input->n;               // Number of elements
     double factor = -0.5/(sigma*sigma); // Factor for Gaussian
+
+    if (Nbin < Npixel) {
+	// cannot smooth narrow vector
+	return NULL;
+    }
 
     #define VECTOR_SMOOTH_CASE(TYPE) \
@@ -60,5 +65,5 @@
         /* smooth first Nrange pixels, with renorm */ \
         /* XXX need to check that this does not run over end for narrow vectors */ \
-        for (long i = 0; i < Nrange; i++, vi++, vo++) { \
+        for (long i = 0; i < Nrange; i++, vi++, vo++) {	\
             ps##TYPE *vr = vi - i; \
             ps##TYPE *vg = gauss - i; \
