diff options
author | Brian Paul <[email protected]> | 2006-09-21 22:59:50 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-09-21 22:59:50 +0000 |
commit | 76785cb70af51c99fd74d897faa2771d2e2702f5 (patch) | |
tree | c6154d0224838815d60b80cfe1195e4b63cec40e /src/mesa/main/bufferobj.c | |
parent | 87c5ec817c02f497b5608b5756c207bb0c6b48ff (diff) |
move a conditional into an assertion
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index adaf3ade078..3f9f7985465 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -296,7 +296,10 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, { (void) ctx; (void) target; - if (bufObj->Data && ((GLuint) (size + offset) <= bufObj->Size)) { + /* this should have been caught in _mesa_BufferSubData() */ + ASSERT((GLuint) (size + offset) <= bufObj->Size); + + if (bufObj->Data) { _mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size ); } } @@ -336,9 +339,9 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, /** * Fallback function called via ctx->Driver.MapBuffer(). * Hardware drivers that really implement buffer objects should never use - * function. + * this function. * - * The input parameters will have been already tested for errors. + * The function parameters will have been already tested for errors. * * \param ctx GL context. * \param target Buffer object target on which to operate. |