diff options
author | José Fonseca <[email protected]> | 2008-07-05 03:21:27 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-07-05 03:51:26 +0900 |
commit | 152ed98b84acf500f4b5122cf3fde82c6e5206f2 (patch) | |
tree | 9955a97473bfe5048ca07547642b45ca96939c25 /src/gallium | |
parent | c23b64f1646ac5349c395ede47707906ddff7b4c (diff) |
softpipe: Prevent NULL ptr derreference on takedown.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c index 24b91fbc794..901c8f83e75 100644 --- a/src/gallium/drivers/softpipe/sp_state_fs.c +++ b/src/gallium/drivers/softpipe/sp_state_fs.c @@ -154,8 +154,8 @@ softpipe_set_constant_buffer(struct pipe_context *pipe, /* note: reference counting */ pipe_buffer_reference(ws, &softpipe->constants[shader].buffer, - buf->buffer); - softpipe->constants[shader].size = buf->size; + buf ? buf->buffer : NULL); + softpipe->constants[shader].size = buf ? buf->size : 0; softpipe->dirty |= SP_NEW_CONSTANTS; } |