projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1a89ea
)
st/mesa: Remove NULL check of pointer that could not be NULL.
author
Vinson Lee
<vlee@vmware.com>
Fri, 16 Apr 2010 07:55:35 +0000
(
00:55
-0700)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 16 Apr 2010 07:55:35 +0000
(
00:55
-0700)
cbuf has been dereferenced twice earlier in the same if-block. It is
either not NULL or a crash has already occurred.
src/mesa/state_tracker/st_atom_constbuf.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_atom_constbuf.c
b/src/mesa/state_tracker/st_atom_constbuf.c
index 5ac81bd4ee27e4ce04612521a5fd4b9abb312a12..a8f2b879d532c511c8d04476ac94c063532c128b 100644
(file)
--- 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);
}