Index: trunk/psModules/src/astrom/pmAstrometryWCS.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryWCS.c	(revision 36455)
+++ trunk/psModules/src/astrom/pmAstrometryWCS.c	(revision 36492)
@@ -576,4 +576,11 @@
     psFree (region);
 
+    // XXX if the inversion fails, we probably do not have a valid transform anyway
+    if (!chip->fromFPA) {
+      psWarning ("failed to find a valid transformation");
+      psFree (chip->toFPA);
+      return false;
+    }
+
     // this can take a very long time...
     while (fpa->toSky->R < 0)
