summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-06-23 08:35:41 -0600
committerBrian Paul <[email protected]>2008-06-23 08:35:41 -0600
commit016dbb0cf395702cfad046f827e3cc4541ae5818 (patch)
treead4a23287b0ec502df78221cc7015724cfe047ce /src/gallium/auxiliary/util
parent76b94a636eea0ffb642a90cf9ff4a00bfe6e064e (diff)
gallium: added some assertions
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/p_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/p_util.c b/src/gallium/auxiliary/util/p_util.c
index 2a92f8e408b..0e3f082b3ee 100644
--- a/src/gallium/auxiliary/util/p_util.c
+++ b/src/gallium/auxiliary/util/p_util.c
@@ -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;