[Mesa-dev] [PATCH 2/4] r300g: fix crash while binding a NULL constant buffer
Marek Olšák
maraeo at gmail.com
Thu Mar 21 12:27:48 PDT 2013
---
src/gallium/drivers/r300/r300_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index ad93510..2de0fd6 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) {
--
1.7.10.4
More information about the mesa-dev
mailing list