Index: /trunk/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- /trunk/psphot/src/psphotExtendedSourceFits.c	(revision 29014)
+++ /trunk/psphot/src/psphotExtendedSourceFits.c	(revision 29015)
@@ -288,4 +288,8 @@
         // save the modelFlux here in case we need to subtract it (for failure)
         psImage *modelFluxStart = psMemIncrRefCounter (source->modelFlux);
+	if (!modelFluxStart) {
+	  // XXX raise an error of some kind?
+	  continue;
+	}
 
         if (savePics) {
Index: /trunk/psphot/src/psphotSourceFits.c
===================================================================
--- /trunk/psphot/src/psphotSourceFits.c	(revision 29014)
+++ /trunk/psphot/src/psphotSourceFits.c	(revision 29015)
@@ -675,9 +675,11 @@
 	}
 	
+# if (0)
 	pmSourceFitModel (source, model, &options, maskVal);
+# else
+	pmSourceModelGuessPCM(pcm, source, maskVal, markVal);
+	pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);
+# endif
 	fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
-
-	// pmSourceModelGuessPCM(pcm, source, maskVal, markVal);
-	// pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);
 
 	chiSquare[i] = model->chisq;
