From 560ad7e59940423a696e93e62ec3c41b1e553421 Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Wed, 3 Nov 2010 22:14:00 +0100 Subject: [PATCH] r300g: Do not use buf param before checking for NULL. Commit 8dfafbf0861fe3d2542332658dd5493851053c78 forgot to update r300g. There is a buf == NULL check, but buf is used before for var init. Tested-by: Guillermo S. Romero --- 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 f2479a994c8..f513f87ca41 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1789,7 +1789,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe, { struct r300_context* r300 = r300_context(pipe); struct r300_constant_buffer *cbuf; - uint32_t *mapped = r300_buffer(buf)->user_buffer; + uint32_t *mapped; switch (shader) { case PIPE_SHADER_VERTEX: -- 2.30.2