summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-03-10 12:24:03 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-03-10 12:24:03 +0000
commitc282c0b6e40f9ed3cbf9d4c4eeb01d1896763246 (patch)
tree7b0dad7468b7c5b393176f158df7b66909053937 /src/gallium/drivers/softpipe
parentc4e0ae3907a3eeaf906a813814e20c4817b744ff (diff)
softpipe: Prevent NULL dereference.
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index a151758ddc..462f4d2655 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -62,7 +62,8 @@ softpipe_bind_vertex_elements_state(struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_VERTEX;
- draw_set_vertex_elements(softpipe->draw, sp_velems->count, sp_velems->velem);
+ if (sp_velems)
+ draw_set_vertex_elements(softpipe->draw, sp_velems->count, sp_velems->velem);
}
void