Index: trunk/magic/remove/src/streaksremove.c
===================================================================
--- trunk/magic/remove/src/streaksremove.c	(revision 24691)
+++ trunk/magic/remove/src/streaksremove.c	(revision 24716)
@@ -483,5 +483,8 @@
     if (sf->bilevelAstrometry) {
 
-        linearizeTransforms(sf->astrom);
+        if (!linearizeTransforms(sf->astrom)) {
+            // fit failed, leave the astrometry unchanged
+            return;
+        }
 
         if (!pmAstromWriteWCS(sf->outImage->header, sf->inAstrom->fpa, sf->chip, 0.001)) {
