Index: trunk/psModules/src/detrend/pmDark.c
===================================================================
--- trunk/psModules/src/detrend/pmDark.c	(revision 35577)
+++ trunk/psModules/src/detrend/pmDark.c	(revision 35583)
@@ -433,4 +433,8 @@
                 }
                 pmReadout *readout = inputs->data[r]; // Input readout
+		if ((!readout)||(!readout->image)) {
+		  mask->data.PS_TYPE_VECTOR_MASK_DATA[r] = 0xff;
+		  continue;
+		}		  
                 int yIn = i - readout->row0; // y position on input readout
                 int xIn = j - readout->col0; // x position on input readout
