Index: /branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c
===================================================================
--- /branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c	(revision 30770)
+++ /branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c	(revision 30771)
@@ -613,5 +613,7 @@
 
       // allocate image, weight, mask for the new image for each peak
-      pmSourceRedefinePixels (sourceOut, readoutOut, sourceOut->peak->x, sourceOut->peak->y, sourceOut->modelPSF->fitRadius);
+      if (sourceOut->modelPSF) {
+	pmSourceRedefinePixels (sourceOut, readoutOut, sourceOut->peak->x, sourceOut->peak->y, sourceOut->modelPSF->fitRadius);
+      }
 
       // child sources have not been subtracted in this image, but this flag may be raised if
Index: /branches/eam_branches/ipp-20110213/psphot/src/psphotReplaceUnfit.c
===================================================================
--- /branches/eam_branches/ipp-20110213/psphot/src/psphotReplaceUnfit.c	(revision 30770)
+++ /branches/eam_branches/ipp-20110213/psphot/src/psphotReplaceUnfit.c	(revision 30771)
@@ -155,4 +155,5 @@
       // sources have not yet been subtracted in this image (but this flag may be raised)
       source->tmpFlags &= ~PM_SOURCE_TMPF_SUBTRACTED;
+      if (!source->modelPSF) continue;
 
       float Xo = source->modelPSF->params->data.F32[PM_PAR_XPOS];
@@ -231,4 +232,6 @@
       bool isPSF = false;
       pmModel *model = pmSourceGetModel(&isPSF, source);
+      if (!model) continue;
+
       float radius = model->fitRadius; // save for future use below
 
