Index: trunk/ppSub/src/ppSubMatchPSFs.c
===================================================================
--- trunk/ppSub/src/ppSubMatchPSFs.c	(revision 26935)
+++ trunk/ppSub/src/ppSubMatchPSFs.c	(revision 26936)
@@ -123,5 +123,8 @@
     pmReadout *inSourceRO = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.SOURCES");
     pmReadout *refSourceRO = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.SOURCES");
-    // XXX assert on inSourcesRO and refSourcesRO?
+    if (!inSourceRO || !refSourceRO) {
+        psWarning("Unable to scale kernel, since no sources were provided.");
+        return true;
+    }
 
     pmDetections *inDetections = psMetadataLookupPtr(NULL, inSourceRO->analysis, "PSPHOT.DETECTIONS"); // Input sources
@@ -214,11 +217,11 @@
     pmDetections *detections = NULL;    // Merged detection set
     if (inDetections && refDetections) {
-	psArray *inSources  = inDetections->allSources;
-	psArray *refSources = refDetections->allSources;
-
-	psAssert (inSources, "missing in sources?");
-	psAssert (refSources, "missing ref sources?");
-
-	detections = pmDetectionsAlloc();
+        psArray *inSources  = inDetections->allSources;
+        psArray *refSources = refDetections->allSources;
+
+        psAssert (inSources, "missing in sources?");
+        psAssert (refSources, "missing ref sources?");
+
+        detections = pmDetectionsAlloc();
         float radius = psMetadataLookupF32(NULL, recipe, "SOURCE.RADIUS"); // Matching radius
         psArray *lists = psArrayAlloc(2); // Source lists
@@ -229,11 +232,11 @@
         if (!detections->allSources) {
             psError(PS_ERR_UNKNOWN, false, "Unable to merge source lists");
-	    psFree(detections);
+            psFree(detections);
             return false;
         }
-    } 
+    }
     if (!detections && inDetections) {
         detections = psMemIncrRefCounter(inDetections);
-    } 
+    }
     if (!detections && refDetections) {
         detections = psMemIncrRefCounter(refDetections);
