From: Zack Rusin Date: Wed, 23 Dec 2009 17:34:34 +0000 (-0500) Subject: softpipe/gs: don't crash with null shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42eefb8235437655632b36490f49a3a8fdc69401;p=mesa.git softpipe/gs: don't crash with null shader --- 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); }