From 53228fe2a8dafe102a3d764de97ee963ecfb4508 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 21 Mar 2013 19:29:29 +0100 Subject: [PATCH] r300g: fix crash while binding a NULL constant buffer --- 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 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) { -- 2.30.2