summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_dead_builtin_varyings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/opt_dead_builtin_varyings.cpp')
-rw-r--r--src/glsl/opt_dead_builtin_varyings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_dead_builtin_varyings.cpp b/src/glsl/opt_dead_builtin_varyings.cpp
index 7099b9ff8e1..b336bc0a8a0 100644
--- a/src/glsl/opt_dead_builtin_varyings.cpp
+++ b/src/glsl/opt_dead_builtin_varyings.cpp
@@ -512,7 +512,7 @@ do_dead_builtin_varyings(struct gl_context *ctx,
tfeedback_decl *tfeedback_decls)
{
/* Lower the gl_FragData array to separate variables. */
- if (consumer->Type == GL_FRAGMENT_SHADER) {
+ if (consumer && consumer->Type == GL_FRAGMENT_SHADER) {
lower_fragdata_array(consumer->ir);
}