summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-12-23 12:34:34 -0500
committerZack Rusin <[email protected]>2009-12-25 05:52:17 -0500
commit42eefb8235437655632b36490f49a3a8fdc69401 (patch)
tree8b56d5fcc06a6956e828a6ecb639dbbcc3cacd6a /src/gallium
parentb0575151b66c9f5387c0433f41db9c19a848d45e (diff)
softpipe/gs: don't crash with null shader
Diffstat (limited to 'src/gallium')
-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);
}