summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_program.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index acd3b56b905..c419c4066a1 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/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;