Index: trunk/psModules/src/objects/pmPSFtryModel.c
===================================================================
--- trunk/psModules/src/objects/pmPSFtryModel.c	(revision 29004)
+++ trunk/psModules/src/objects/pmPSFtryModel.c	(revision 30031)
@@ -136,9 +136,14 @@
 
         // stage 2: construct a psf (pmPSF) from this collection of model fits, including the 2D variation
-        if (!pmPSFtryMakePSF (psfTry)) {
+	bool goodFit = false;
+        if (!pmPSFtryMakePSF (&goodFit, psfTry)) {
             psError(PS_ERR_UNKNOWN, false, "failed to construct a psf model from collection of sources");
             psFree(psfTry);
             return NULL;
         }
+	if (!goodFit) {
+	    psWarning ("poor psf fit for order %d, skipping\n", i);
+	    continue;
+	}
 
         // stage 3: refit with fixed shape parameters, measure pmPSFtry->metric
@@ -169,4 +174,10 @@
     }
     psFree (srcMask);
+
+    if (!minPSF) {
+	psError(PS_ERR_UNKNOWN, false, "failed to construct a valid psf model from the sources");
+	psFree(psfTry);
+	return NULL;
+    }
 
     // keep the ones matching the min systematic error:
