Index: /trunk/psModules/src/objects/pmPSFtry.c
===================================================================
--- /trunk/psModules/src/objects/pmPSFtry.c	(revision 10852)
+++ /trunk/psModules/src/objects/pmPSFtry.c	(revision 10853)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-12-01 19:27:38 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-29 18:31:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -213,5 +213,5 @@
 
     // linear clipped fit of chisq trend vs flux
-    psfTry->psf->ChiTrend = psVectorClipFitPolynomial1D(psfTry->psf->ChiTrend, stats, mask, 1, chisq, NULL, flux);
+    bool result = psVectorClipFitPolynomial1D(psfTry->psf->ChiTrend, stats, mask, 1, chisq, NULL, flux);
     psLogMsg ("pmPSFtry", 4, "chisq vs flux fit: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
 
@@ -221,5 +221,5 @@
     psFree (chisq);
 
-    if (psfTry->psf->ChiTrend == NULL) {
+    if (!result) {
         psError(PS_ERR_UNKNOWN, false, "Failed to fit psf->ChiTrend");
         psFree(psfTry);
@@ -274,6 +274,6 @@
     poly->mask[1] = 1;
 
-    poly = psVectorClipFitPolynomial1D (poly, stats, psfTry->mask, PSFTRY_MASK_ALL, psfTry->metric, psfTry->metricErr, r2rflux);
-    if (poly == NULL) {
+    bool result = psVectorClipFitPolynomial1D (poly, stats, psfTry->mask, PSFTRY_MASK_ALL, psfTry->metric, psfTry->metricErr, r2rflux);
+    if (!result) {
         psError(PS_ERR_UNKNOWN, false, "Failed to fit clipped poly");
         return false;
