From c282c0b6e40f9ed3cbf9d4c4eeb01d1896763246 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 10 Mar 2010 12:24:03 +0000 Subject: [PATCH] softpipe: Prevent NULL dereference. --- src/gallium/drivers/softpipe/sp_state_vertex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c index a151758ddca..462f4d2655e 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 -- 2.30.2