summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/softpipe/sp_state_fs.c3
1 files changed, 2 insertions, 1 deletions
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);
}