Index: trunk/psphot/src/psphotFindFootprints.c
===================================================================
--- trunk/psphot/src/psphotFindFootprints.c	(revision 24203)
+++ trunk/psphot/src/psphotFindFootprints.c	(revision 24274)
@@ -59,5 +59,5 @@
 
         psArray *mergedFootprints = pmFootprintArraysMerge(detections->footprints, footprints, includePeaks);
-        psLogMsg ("psphot", PS_LOG_MINUTIA, "merged %ld new footprints with %ld existing ones: %f sec\n", footprints->n, detections->footprints->n, psTimerMark ("psphot.footprints"));
+        psLogMsg ("psphot", PS_LOG_MINUTIA, "merged %ld new footprints with %ld existing ones: %f sec\n", footprints->n, (detections->footprints ? detections->footprints->n : 0), psTimerMark ("psphot.footprints"));
 
         psFree(footprints);
Index: trunk/psphot/src/psphotReadoutMinimal.c
===================================================================
--- trunk/psphot/src/psphotReadoutMinimal.c	(revision 24203)
+++ trunk/psphot/src/psphotReadoutMinimal.c	(revision 24274)
@@ -46,5 +46,6 @@
 
     // find the detections (by peak and/or footprint) in the image.
-    pmDetections *detections = psphotFindDetections (NULL, readout, recipe);
+    pmDetections *detections = pmDetectionsAlloc(); // New detections; allocated to ensure pass=2
+    detections = psphotFindDetections(detections, readout, recipe);
     if (!detections) {
         psLogMsg ("psphot", 3, "unable to find detections in this image");
