Index: trunk/psphot/src/psphotStackMatchPSFsPrepare.c
===================================================================
--- trunk/psphot/src/psphotStackMatchPSFsPrepare.c	(revision 33457)
+++ trunk/psphot/src/psphotStackMatchPSFsPrepare.c	(revision 33462)
@@ -32,7 +32,7 @@
 	pmDetections *detections = psMetadataLookupPtr(NULL, readout->analysis, "PSPHOT.DETECTIONS"); // Sources
 	if (!detections || !detections->allSources) {
-	    psWarning("No detections found for image %d --- rejecting.", index);
-	    options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[index] = 0x01;
-	    return true;  // XXX not an error: we continue processing other images
+            // An input must have sources. If we got here without any the input file was likely corrupt
+            psError(PSPHOT_ERR_IO, true, "Input %d has no sources.\n\tCheck all instances of: %s", index, inputSrc->origname);
+            return false;
 	}
 	psAssert (detections->allSources, "missing sources?");
