gallium: added some assertions
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 14:35:41 +0000 (08:35 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 14:35:41 +0000 (08:35 -0600)
src/gallium/auxiliary/util/p_util.c

index 2a92f8e..0e3f082 100644 (file)
@@ -53,6 +53,12 @@ pipe_copy_rect(ubyte * dst,
 {
    unsigned i;
 
+   assert(cpp > 0);
+   assert(src_x >= 0);
+   assert(src_y >= 0);
+   assert(dst_x >= 0);
+   assert(dst_y >= 0);
+
    dst_pitch *= cpp;
    src_pitch *= cpp;
    dst += dst_x * cpp;