aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_program.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index acd3b56b9..c419c4066 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -1154,7 +1154,8 @@ destroy_shader_program_variants_cb(GLuint key, void *data, void *userData)
}
for (i = 0; i < Elements(shProg->_LinkedShaders); i++) {
- destroy_program_variants(st, shProg->_LinkedShaders[i]->Program);
+ if (shProg->_LinkedShaders[i])
+ destroy_program_variants(st, shProg->_LinkedShaders[i]->Program);
}
}
break;