Index: trunk/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- trunk/psphot/src/psphotExtendedSourceFits.c	(revision 29004)
+++ 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) {
