Index: /trunk/psLib/test/image/tst_psImageStats00.c
===================================================================
--- /trunk/psLib/test/image/tst_psImageStats00.c	(revision 1955)
+++ /trunk/psLib/test/image/tst_psImageStats00.c	(revision 1956)
@@ -179,5 +179,6 @@
     }
 
-    myHist2 = psImageHistogram(NULL,tmpImage,tmpMask,1);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid mask type.");
+    myHist2 = psImageHistogram(myHist,tmpImage,tmpMask,1);
     if (myHist2 != NULL) {
         printf("ERROR: myHist2 not equal to NULL\n");
@@ -187,5 +188,4 @@
 
     psMemCheckCorruption( 1 );
-    psFree( myHist );
     psFree( tmpImage );
     psMemCheckCorruption( 1 );
Index: /trunk/psLib/test/image/verified/tst_psImageStats00.stderr
===================================================================
--- /trunk/psLib/test/image/verified/tst_psImageStats00.stderr	(revision 1955)
+++ /trunk/psLib/test/image/verified/tst_psImageStats00.stderr	(revision 1956)
@@ -0,0 +1,4 @@
+<DATE><TIME>|<HOST>|I|main
+    Following should be an error for invalid mask type.
+<DATE><TIME>|<HOST>|E|psLib.image.psImageHistogram
+    Input psImage mask type, psS8, is not the supported mask datatype of psU8.
