Index: trunk/stac/src/stacSize.c
===================================================================
--- trunk/stac/src/stacSize.c	(revision 3666)
+++ trunk/stac/src/stacSize.c	(revision 3669)
@@ -12,4 +12,5 @@
     int nImages = images->n;		// Number of input images
     assert(maps->n == nImages);
+    assert(outnx && outny);		// Must be able to write to these
 
     psPlane *inCoord = psAlloc(sizeof(psPlane)); // Input coordinates
@@ -92,6 +93,10 @@
 
     // Tweak the maps to account for the offset
-    *xMapDiff = floor(xMin);
-    *yMapDiff = floor(yMin);
+    if (xMapDiff != NULL) {
+	*xMapDiff = floor(xMin);
+    }
+    if (yMapDiff != NULL) {
+	*yMapDiff = floor(yMin);
+    }
     for (int i = 0; i < nImages; i++) {
 	psPlaneTransform *map = maps->data[i]; // The map of interest
