r300g: Do not use buf param before checking for NULL.
authorGuillermo S. Romero <gsromero@infernal-iceberg.com>
Wed, 3 Nov 2010 21:14:00 +0000 (22:14 +0100)
committerKeith Whitwell <keithw@vmware.com>
Thu, 4 Nov 2010 13:26:24 +0000 (13:26 +0000)
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 <gsromero@infernal-iceberg.com>
src/gallium/drivers/r300/r300_state.c

index f2479a994c85e1a406c07e75b41e34af1cf4c7e5..f513f87ca413464bbba22c3787ce1ccbf94699f3 100644 (file)
@@ -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: