Index: trunk/psModules/src/camera/pmHDUGenerate.c
===================================================================
--- trunk/psModules/src/camera/pmHDUGenerate.c	(revision 7278)
+++ trunk/psModules/src/camera/pmHDUGenerate.c	(revision 7288)
@@ -213,5 +213,7 @@
         pmReadout *readout = cell->readouts->data[0]; // The first readout, as representative
         psImage *image = readout->image;// The proper image
-
+        if (!image) {
+            continue;
+        }
         psFree(trimsec);                // Drop old reference
         trimsec = sectionForImage(&position, image, cellreaddir); // New reference
@@ -254,4 +256,7 @@
             for (int i = 0; i < numReadouts; i++) {
                 pmReadout *readout = readouts->data[i]; // The readout
+                if (!readout || !readout->image) {
+                    continue;
+                }
                 psElemType imageType = readout->image->type.type; // Type for this image
                 if (type == 0) {
@@ -309,4 +314,7 @@
             for (int i = 0; i < readouts->n; i++) {
                 pmReadout *readout = readouts->data[i]; // The readout of interest
+                if (!readout) {
+                    continue;
+                }
                 psImage *image = readout->image; // The image pixels
                 psImage *hduImage = hduImages->data[i]; // The HDU image of interest
