summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_gs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index f8cb04a8f3..987c01a791 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -788,6 +788,9 @@ void draw_bind_geometry_shader(struct draw_context *draw,
void draw_delete_geometry_shader(struct draw_context *draw,
struct draw_geometry_shader *dgs)
{
+ if (!dgs) {
+ return;
+ }
#ifdef HAVE_LLVM
if (draw_get_option_use_llvm()) {
struct llvm_geometry_shader *shader = llvm_geometry_shader(dgs);