projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4848d2
)
i915g: Prevent NULL dereference.
author
Chia-I Wu
<olv@lunarg.com>
Wed, 10 Mar 2010 14:58:51 +0000
(22:58 +0800)
committer
Chia-I Wu
<olv@lunarg.com>
Wed, 10 Mar 2010 15:00:09 +0000
(23:00 +0800)
bind_vertex_elements_state may be called with NULL velems. Do nothing
if that is the case.
src/gallium/drivers/i915/i915_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/i915/i915_state.c
b/src/gallium/drivers/i915/i915_state.c
index 8927dfc33d474177aeae2080b704399fefd119d5..377d8425a5cb11238969c7fe30ed63b76fddff78 100644
(file)
--- a/
src/gallium/drivers/i915/i915_state.c
+++ b/
src/gallium/drivers/i915/i915_state.c
@@
-770,7
+770,10
@@
i915_bind_vertex_elements_state(struct pipe_context *pipe,
draw_flush(i915->draw);
/* pass-through to draw module */
- draw_set_vertex_elements(i915->draw, i915_velems->count, i915_velems->velem);
+ if (i915_velems) {
+ draw_set_vertex_elements(i915->draw,
+ i915_velems->count, i915_velems->velem);
+ }
}
static void