Index: branches/eam_branches/relastro.20100326/src/FitChip.c
===================================================================
--- branches/eam_branches/relastro.20100326/src/FitChip.c	(revision 27487)
+++ branches/eam_branches/relastro.20100326/src/FitChip.c	(revision 27488)
@@ -22,4 +22,5 @@
   CoordFit *fit;
   double dL, dM, dR, dRmax, *values;
+  Coords oldCoords;
 
   ALLOCATE (values, double, Nmatch);
@@ -84,5 +85,5 @@
       default:
         fprintf (stderr, "invalid chip order %d\n", coords[0].Npolyterms);
-        abort ();
+	skip = TRUE;
     }
     if (skip) {
@@ -96,6 +97,14 @@
 
     // measure the fit, update the coords & object coordinates
-    fit_eval (fit);
-    fit_apply_coords (fit, coords);
+    if (!fit_eval (fit)) {
+      fprintf (stderr, "failed to fit new model\n");
+      return FALSE;
+    }
+
+    if (!fit_apply_coords (fit, coords)) {
+      fprintf (stderr, "failed to fit new model\n");
+      return FALSE;
+    }
+
     fit_free (fit);
 
@@ -107,5 +116,5 @@
 
   free (values);
-  return;
+  return TRUE;
 }
 
