Index: trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 17730)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 17731)
@@ -413,8 +413,8 @@
     PM_ASSERT_READOUT_MASK(readout, false);
 
-    int numCols = image->numCols, numRows = image->numRows; // Size of image
-    psMaskType **maskData = mask->data.PS_TYPE_MASK_DATA; // Dereference mask
-    psF32 **imageData = image->data.F32;// Dereference image
-    psF32 **weightData = weight->data.F32; // Dereference weight map
+    int numCols = readout->image->numCols, numRows = readout->image->numRows; // Size of image
+    psMaskType **maskData = readout->mask->data.PS_TYPE_MASK_DATA; // Dereference mask
+    psF32 **imageData = readout->image->data.F32;// Dereference image
+    psF32 **weightData = readout->weight ? readout->weight->data.F32 : NULL; // Dereference weight map
 
     for (int y = 0; y < numRows; y++) {
@@ -422,5 +422,5 @@
             if (maskData[y][x] & maskVal) {
                 imageData[y][x] = NAN;
-                if (weight) {
+                if (weightData) {
                     weightData[y][x] = NAN;
                 }
