Index: branches/pap/ppStack/src/ppStackCombineFinal.c
===================================================================
--- branches/pap/ppStack/src/ppStackCombineFinal.c	(revision 25810)
+++ branches/pap/ppStack/src/ppStackCombineFinal.c	(revision 25811)
@@ -16,4 +16,8 @@
     psAssert(options, "Require options");
     psAssert(config, "Require configuration");
+
+    if (!target->mask) {
+        target->mask = psImageAlloc(target->image->numCols, target->image->numRows, PS_TYPE_IMAGE_MASK);
+    }
 
     stack->lastScan = 0;            // Reset read
