Index: trunk/stac/src/stacTransform.c
===================================================================
--- trunk/stac/src/stacTransform.c	(revision 5745)
+++ trunk/stac/src/stacTransform.c	(revision 6887)
@@ -127,4 +127,5 @@
     if (*outputs == NULL) {
         *outputs = psArrayAlloc(nImages);
+        (*outputs)->n = nImages;
         psTrace("stac.transform", 5, "Allocating space for transformed images, %dx%d\n", outnx, outny);
         for (int i = 0; i < nImages; i++) {
@@ -138,4 +139,5 @@
     if (errors && (*outErrors == NULL)) {
         *outErrors = psArrayAlloc(errors->n);
+        (*outErrors)->n = errors->n;
         psTrace("stac.transform", 5, "Allocating space for transformed error images, %dx%d\n", outnx, outny);
         for (int i = 0; i < nImages; i++) {
