Index: branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceReadout.c
===================================================================
--- branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceReadout.c	(revision 36641)
+++ branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceReadout.c	(revision 36677)
@@ -78,5 +78,4 @@
     psphotMergeSources (config, view, filerule);
 
-
     // generate a psf model for any readouts which need one
     // psphotFullForcePSF (config, view, filerule);
@@ -84,5 +83,9 @@
     // sources; we should mark with a flag bit the ones we actually want to use as PSF
     // stars (this means we need to supply this info in the load).
-    psphotChoosePSF (config, view, filerule, false);
+    if (!psphotChoosePSF (config, view, filerule, false)) {
+        // PSPHOT_ERR_DATA causes this program to exit gracefully
+        psError (PSPHOT_ERR_DATA, false, "failed to construct psf model");
+        return  psphotReadoutCleanup (config, view, filerule);
+    }
 
     // Construct an initial model for each object, set the radius to fitRadius, set circular
Index: branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceSummary.c
===================================================================
--- branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceSummary.c	(revision 36641)
+++ branches/eam_branches/ipp-20140402/psphot/src/psphotFullForceSummary.c	(revision 36677)
@@ -193,4 +193,6 @@
         if (ID >= sortedTable->n) {
             sortedTable = psArrayRealloc(sortedTable, 2*ID);
+            // Why doesn't psArrayRealloc do this?????
+            sortedTable->n = sortedTable->nalloc;
         }
         if (sortedTable->data[ID]) {
Index: branches/eam_branches/ipp-20140402/psphot/src/psphotLensing.c
===================================================================
--- branches/eam_branches/ipp-20140402/psphot/src/psphotLensing.c	(revision 36641)
+++ branches/eam_branches/ipp-20140402/psphot/src/psphotLensing.c	(revision 36677)
@@ -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
