Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 10823)
+++ trunk/psLib/src/astro/psCoord.c	(revision 10848)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.128 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-12-22 21:19:47 $
+*  @version $Revision: 1.129 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-12-29 04:38:42 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -905,6 +905,7 @@
     }
 
-    trans->x = psVectorFitPolynomial2D(trans->x, NULL, 0, xOut, NULL, xIn, yIn);
-    trans->y = psVectorFitPolynomial2D(trans->y, NULL, 0, yOut, NULL, xIn, yIn);
+    bool result = true;
+    result &= psVectorFitPolynomial2D(trans->x, NULL, 0, xOut, NULL, xIn, yIn);
+    result &= psVectorFitPolynomial2D(trans->y, NULL, 0, yOut, NULL, xIn, yIn);
     psFree(xIn);
     psFree(yIn);
@@ -912,5 +913,5 @@
     psFree(yOut);
 
-    if ((trans->x == NULL) || (trans->y == NULL)) {
+    if (!result) {
         psError( PS_ERR_UNKNOWN, true, "psVectorFitPolynomial2D() returned NULL: could not fit a 2-D polynomial to the data.\n");
         return(false);
@@ -997,6 +998,7 @@
     }
 
-    myPT->x = psVectorFitPolynomial2D(myPT->x, NULL, 0, xOut, NULL, xIn, yIn);
-    myPT->y = psVectorFitPolynomial2D(myPT->y, NULL, 0, yOut, NULL, xIn, yIn);
+    bool result = true;
+    result &= psVectorFitPolynomial2D(myPT->x, NULL, 0, xOut, NULL, xIn, yIn);
+    result &= psVectorFitPolynomial2D(myPT->y, NULL, 0, yOut, NULL, xIn, yIn);
 
     psFree(inCoord);
@@ -1007,5 +1009,5 @@
     psFree(yOut);
 
-    if ((myPT->x == NULL) || (myPT->y == NULL)) {
+    if (!result) {
         psError( PS_ERR_UNKNOWN, true, "psVectorFitPolynomial2D() returned NULL: could not fit a 2-D polynomial to the data.\n");
         psFree(out);
