Index: /branches/rel10_ifa/psModules/src/astrom/pmHDU.c
===================================================================
--- /branches/rel10_ifa/psModules/src/astrom/pmHDU.c	(revision 6721)
+++ /branches/rel10_ifa/psModules/src/astrom/pmHDU.c	(revision 6722)
@@ -75,4 +75,8 @@
         psTrace(__func__, 5, "Reading the header...\n");
         hdu->header = psFitsReadHeader(NULL, fits);
+        if (! hdu->header) {
+            psError(PS_ERR_IO, false, "Unable to read header for extension %s\n", hdu->extname);
+            return false;
+        }
     }
 
@@ -87,4 +91,8 @@
         psTrace(__func__, 5, "Reading the pixels...\n");
         hdu->images = psFitsReadImageCube(fits, psRegionSet(0,0,0,0));
+        if (! hdu->images) {
+            psError(PS_ERR_IO, false, "Unable to read pixels for extension %s\n", hdu->extname);
+            return false;
+        }
         return true;
         #ifdef FITS_TABLES
