Mesa (master): i965: added null const_buffer pointer check in update_constant_buffer()

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 10 14:39:31 UTC 2009


Module: Mesa
Branch: master
Commit: 23a911b4a66914883ece70c1e621dfc082661a28
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23a911b4a66914883ece70c1e621dfc082661a28

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Apr 10 08:36:04 2009 -0600

i965: added null const_buffer pointer check in update_constant_buffer()

---

 src/mesa/drivers/dri/i965/brw_curbe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 08b602a..94bf2c0 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -343,7 +343,7 @@ update_constant_buffer(struct brw_context *brw,
    const int size = params->NumParameters * 4 * sizeof(GLfloat);
 
    /* copy Mesa program constants into the buffer */
-   if (size > 0) {
+   if (const_buffer && size > 0) {
       GLubyte *map;
 
       assert(const_buffer);




More information about the mesa-commit mailing list