aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-03-21 19:29:29 +0100
committerMarek Olšák <[email protected]>2013-03-26 01:28:18 +0100
commit53228fe2a8dafe102a3d764de97ee963ecfb4508 (patch)
tree936fa9e34201ff3661d3f0959ab0de3951a05f5f
parent92855bcc95207252045314b658eb10c6305020bc (diff)
r300g: fix crash while binding a NULL constant buffer
-rw-r--r--src/gallium/drivers/r300/r300_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index ad93510ab3f..2de0fd6b7f9 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -2056,7 +2056,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
struct r300_constant_buffer *cbuf;
uint32_t *mapped;
- if (!cb)
+ if (!cb || (!cb->buffer && !cb->user_buffer))
return;
switch (shader) {