Index: /trunk/magic/remove/src/streaksremove.c
===================================================================
--- /trunk/magic/remove/src/streaksremove.c	(revision 25433)
+++ /trunk/magic/remove/src/streaksremove.c	(revision 25434)
@@ -864,5 +864,10 @@
             psF32 y = psMetadataLookupF32(NULL, row, "Y_PSF");
 
-            psImageMaskType mask = maskImage->data.PS_TYPE_IMAGE_MASK_DATA[(int)y][(int)x];
+            psImageMaskType mask;
+            if ((x >= maskImage->numCols) || (y >= maskImage->numRows) || (x <  0) || (y < 0)) {
+                mask = maskStreak;
+            } else {
+                mask = maskImage->data.PS_TYPE_IMAGE_MASK_DATA[(int)y][(int)x];
+            }
 
             // Key the source if the center pixel is not masked with maskStreak
