summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_gs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_gs.c b/src/gallium/drivers/llvmpipe/lp_state_gs.c
index b18795cdc4f..55da0f16a8d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_gs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_gs.c
@@ -100,8 +100,11 @@ llvmpipe_delete_gs_state(struct pipe_context *pipe, void *gs)
struct lp_geometry_shader *state =
(struct lp_geometry_shader *)gs;
- draw_delete_geometry_shader(llvmpipe->draw,
- (state) ? state->draw_data : 0);
+ if (!state) {
+ return;
+ }
+
+ draw_delete_geometry_shader(llvmpipe->draw, state->draw_data);
FREE( (void *)state->shader.tokens );
FREE(state);
}