Index: trunk/psModules/src/objects/pmSourcePhotometry.c
===================================================================
--- trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 13457)
+++ trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 13472)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-05-18 14:02:48 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-05-22 21:45:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -195,4 +195,12 @@
     // measure object aperture photometry
     status = pmSourcePhotometryAper  (&source->apMag, model, flux, source->maskObj);
+    if (!status) {
+	psErrorCode last = psErrorCodeLast();
+	if (last == PM_ERR_PHOTOM) {
+	    // the aper mag was undefined (flux < 0).  bad object, but
+	    // don't keep the error on the stack
+	    psErrorClear();
+	}
+    }
 
     // for PSFs, correct both apMag and psfMag to same system, consistent with infinite flux star in aperture RADIUS
