Index: trunk/psphot/src/psphotChoosePSF.c
===================================================================
--- trunk/psphot/src/psphotChoosePSF.c	(revision 8139)
+++ trunk/psphot/src/psphotChoosePSF.c	(revision 8437)
@@ -36,4 +36,9 @@
     }
     psLogMsg ("psphot.pspsf", 4, "selected candidate %d PSF objects\n", stars->n);
+
+    if (stars->n == 0) {
+	psError(PSPHOT_ERR_PSF, true, "Failed to find any PSF candidates");
+	return NULL;
+    }
 
     // get the fixed PSF fit radius
