Index: trunk/stac/src/stacAreaOfInterest.c
===================================================================
--- trunk/stac/src/stacAreaOfInterest.c	(revision 2783)
+++ trunk/stac/src/stacAreaOfInterest.c	(revision 3375)
@@ -1,3 +1,4 @@
 #include <stdio.h>
+#include <assert.h>
 #include "pslib.h"
 #include "stac.h"
@@ -15,8 +16,6 @@
     psDPolynomial2D *yPoly = transform->y;
 
-    if (xPoly->type != PS_POLYNOMIAL_ORD || yPoly->type != PS_POLYNOMIAL_ORD) {
-	psError("stac.area.deriv", "Transformation polynomials aren't ordinary polynomials.\n");
-	return false;
-    }
+    assert(xPoly->type == PS_POLYNOMIAL_ORD);
+    assert(yPoly->type == PS_POLYNOMIAL_ORD);
 
     // Initialise derivatives
@@ -64,16 +63,7 @@
 {
     // Input checks
-    if (mask == NULL) {
-	psError("stac.area", "Input mask is NULL for some weird reason.\n");
-	return NULL;
-    }
-    if (map == NULL) {
-	psError("stac.area", "Input map is NULL for some weird reason.\n");
-	return NULL;
-    }
-    if (mask->type.type != PS_TYPE_U8) {
-	psError("stac.area", "Input mask must be of type U8.\n");
-	return NULL;
-    }
+    assert(mask);
+    assert(map);
+    assert(mask->type.type == PS_TYPE_U8);
     
     // Number of pixels in x and y
