Index: trunk/psModules/src/imcombine/pmStackReject.c
===================================================================
--- trunk/psModules/src/imcombine/pmStackReject.c	(revision 21183)
+++ trunk/psModules/src/imcombine/pmStackReject.c	(revision 21351)
@@ -43,21 +43,21 @@
     if (box > 0) {
         // Convolve a subimage, then stick it in the target
-        if (threaded) {
-            psMutexLock(source);
-        }
+        // XXX if (threaded) {
+        // XXX     psMutexLock(source);
+        // XXX }
         psImage *mask = psImageSubset(source, psRegionSet(xMin - box, xMax + box,
                                                           yMin - box, yMax + box)); // Mask to convolve
-        if (threaded) {
-            psMutexUnlock(source);
-        }
+        // XXX if (threaded) {
+        // XXX     psMutexUnlock(source);
+        // XXX }
         psImage *convolved = psImageConvolveMask(NULL, mask, PM_STACK_MASK_BAD, PM_STACK_MASK_CONVOLVE,
                                                  -box, box, -box, box); // Convolved mask
-        if (threaded) {
-            psMutexLock(source);
-        }
+        // XXX if (threaded) {
+        // XXX     psMutexLock(source);
+        // XXX }
         psFree(mask);
-        if (threaded) {
-            psMutexUnlock(source);
-        }
+        // XXX if (threaded) {
+        // XXX     psMutexUnlock(source);
+        // XXX }
 
         int numBytes = (xMax - xMin) * PSELEMTYPE_SIZEOF(PS_TYPE_IMAGE_MASK); // Number of bytes to copy
@@ -162,7 +162,7 @@
     pmReadout *inRO = pmReadoutAlloc(NULL); // Readout with input image
     inRO->image = image;
-    if (threaded) {
-        psMutexInit(image);
-    }
+    // XXX if (threaded) {
+    // XXX     psMutexInit(image);
+    // XXX }
     for (int i = 0; i < numRegions; i++) {
         psRegion *region = subRegions->data[i]; // Region of interest
@@ -211,7 +211,7 @@
         }
     }
-    if (threaded) {
-        psMutexDestroy(image);
-    }
+    // XXX if (threaded) {
+    // XXX     psMutexDestroy(image);
+    // XXX }
     psFree(inRO);
     psImage *convolved = psMemIncrRefCounter(convRO->image);
@@ -264,7 +264,7 @@
     psImage *target = psImageRecycle(convolved, numCols, numRows, PS_TYPE_IMAGE_MASK); // Grown image
     psImageInit(target, 0);
-    if (threaded) {
-        psMutexInit(source);
-    }
+    // XXX if (threaded) {
+    // XXX     psMutexInit(source);
+    // XXX }
     for (int i = 0; i < subRegions->n; i++) {
         psRegion *region = subRegions->data[i]; // Subtraction region
@@ -287,7 +287,7 @@
                     psArray *args = job->args; // Job arguments
                     psArrayAdd(args, 1, target);
-                    psMutexLock(source);
+                    // XXX psMutexLock(source);
                     psArrayAdd(args, 1, source);
-                    psMutexUnlock(source);
+                    // XXX psMutexUnlock(source);
                     psArrayAdd(args, 1, kernels);
                     PS_ARRAY_ADD_SCALAR(args, numCols, PS_TYPE_S32);
@@ -332,5 +332,5 @@
         }
 
-        psMutexDestroy(source);
+        // XXX psMutexDestroy(source);
     }
 
