Index: /trunk/psLib/test/image/tst_psImageStats00.c
===================================================================
--- /trunk/psLib/test/image/tst_psImageStats00.c	(revision 1947)
+++ /trunk/psLib/test/image/tst_psImageStats00.c	(revision 1948)
@@ -166,4 +166,24 @@
     }
 
+
+    tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_S8 );
+    for ( i = 0;i < tmpMask->numRows;i++ ) {
+        for ( j = 0;j < tmpMask->numCols;j++ ) {
+            if ( ( i > ( tmpMask->numRows / 2 ) ) &&
+                    ( j > ( tmpMask->numCols / 2 ) ) ) {
+                tmpMask->data.S8[ i ][ j ] = 1;
+            } else {
+                tmpMask->data.S8[ i ][ j ] = 0;
+            }
+        }
+    }
+
+    myHist2 = psImageHistogram(NULL,tmpImage,tmpMask,1);
+    if (myHist2 != NULL) {
+        printf("ERROR: myHist2 not equal to NULL\n");
+    }
+
+    psFree( tmpMask );
+
     psMemCheckCorruption( 1 );
     psFree( myHist );
