aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-04-16 00:55:35 -0700
committerVinson Lee <[email protected]>2010-04-16 00:55:35 -0700
commit6c954dd12871aae2c34854498eaf696b67e3680b (patch)
tree6f7de4d9fb3562736e80da776f331637de20d98d
parentb1a89ea1abe1c69e3e0abcdfc2b525fe7f727864 (diff)
st/mesa: Remove NULL check of pointer that could not be NULL.
cbuf has been dereferenced twice earlier in the same if-block. It is either not NULL or a crash has already occurred.
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 5ac81bd4ee2..a8f2b879d53 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -84,10 +84,9 @@ void st_upload_constants( struct st_context *st,
}
/* load Mesa constants into the constant buffer */
- if (cbuf)
- st_no_flush_pipe_buffer_write(st, *cbuf,
- 0, paramBytes,
- params->ParameterValues);
+ st_no_flush_pipe_buffer_write(st, *cbuf,
+ 0, paramBytes,
+ params->ParameterValues);
st->pipe->set_constant_buffer(st->pipe, shader_type, 0, *cbuf);
}