From: Marek Olšák Date: Tue, 29 Oct 2013 23:11:57 +0000 (+0100) Subject: glsl: fix crash introduced by the previous commit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e929e2773736cdb05c8cbd2188360c58e5802978;p=mesa.git glsl: fix crash introduced by the previous commit --- 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); }