glsl: fix crash introduced by the previous commit

This commit is contained in:
Marek Olšák 2013-10-30 00:11:57 +01:00
parent 7e414b5864
commit e929e27737

View 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);
}