Index: /trunk/psphot/src/psphotMergeSources.c
===================================================================
--- /trunk/psphot/src/psphotMergeSources.c	(revision 38542)
+++ /trunk/psphot/src/psphotMergeSources.c	(revision 38543)
@@ -1002,7 +1002,7 @@
 		sourceOut->tmpFlags &= ~PM_SOURCE_TMPF_SUBTRACTED;
 	    } else {
-                if (sourceSrc->modelFlux) {
-                    bool isPSF = false;
-                    pmModel *model = pmSourceGetModel (&isPSF, sourceOut);
+                bool isPSF = false;
+                pmModel *model = pmSourceGetModel (&isPSF, sourceOut);
+                if (model && sourceSrc->modelFlux) {
                     if (model->isPCM) {
                         pmPCMdata *pcm = pmPCMinit (sourceOut, fitOptions, model, maskVal, psfSize);
