glsl: fix crash introduced by the previous commit
authorMarek Olšák <marek.olsak@amd.com>
Tue, 29 Oct 2013 23:11:57 +0000 (00:11 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 29 Oct 2013 23:14:35 +0000 (00:14 +0100)
src/glsl/opt_dead_builtin_varyings.cpp

index 7099b9ff8e1f03c101c01b6afd8401c9a9ec1003..b336bc0a8a0bd688b9de7424a68f977871f22e6d 100644 (file)
@@ -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);
    }