Index: trunk/psphot/src/psphotLensing.c
===================================================================
--- trunk/psphot/src/psphotLensing.c	(revision 36623)
+++ trunk/psphot/src/psphotLensing.c	(revision 36662)
@@ -193,4 +193,8 @@
     // set the max order (0 = constant) which the number of psf stars can support:
     // we require only 3 stars for n = 0, increase stars / cell for higher order
+    if (Npsf < 3) {
+        psLogMsg ("psphot", PS_LOG_INFO, "no sources passed selection criteria, skipping lensing psf trends");
+        return true;
+    }
     int LensingTrendOrder = 0;
     if (Npsf >=  16) LensingTrendOrder = 1; // 4 cells
