From 42eefb8235437655632b36490f49a3a8fdc69401 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 23 Dec 2009 12:34:34 -0500 Subject: softpipe/gs: don't crash with null shader --- src/gallium/drivers/softpipe/sp_state_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c index 22f82b1a429..b904bde25ca 100644 --- a/src/gallium/drivers/softpipe/sp_state_fs.c +++ b/src/gallium/drivers/softpipe/sp_state_fs.c @@ -221,6 +221,7 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void *gs) struct sp_geometry_shader *state = (struct sp_geometry_shader *)gs; - draw_delete_geometry_shader(softpipe->draw, state->draw_data); + draw_delete_geometry_shader(softpipe->draw, + (state) ? state->draw_data : 0); FREE(state); } -- cgit v1.2.3