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 2a92f8e408b68691e46ff84f506e8fef48a8bee9..0e3f082b3ee27d3f87d9041085814a703abe3171 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;