Index: trunk/ppSub/src/ppSubMakePSF.c
===================================================================
--- trunk/ppSub/src/ppSubMakePSF.c	(revision 26982)
+++ trunk/ppSub/src/ppSubMakePSF.c	(revision 27698)
@@ -84,7 +84,9 @@
     // Here, we assume the image is background-subtracted
     pmDetections *detections = psMetadataLookupPtr(&mdok, minuend->analysis, "PSPHOT.DETECTIONS");
-    psAssert(detections, "missing detections?");
+    if (!detections || !detections->allSources) {
+        psError(PPSUB_ERR_CONFIG, true, "No sources from which to determine PSF.");
+        return false;
+    }
     psArray *sources = detections->allSources;
-    psAssert(sources, "missing sources?");
 
     // XXX filter sources?  limit the total number and return only brighter objects?
