glsl: Guard against NULL dereference
authorMark Janes <mark.a.janes@intel.com>
Fri, 20 May 2016 15:50:39 +0000 (08:50 -0700)
committerMark Janes <mark.a.janes@intel.com>
Fri, 20 May 2016 16:52:49 +0000 (09:52 -0700)
commit9ca5ec2a317f00dd03d11c3463d4354baf21aaf0
tree3f926e63a821d8454405043f6b711e089ec9873c
parent9b8c4000d0e92a1e52e2ca52f05dec5254d2a358
glsl: Guard against NULL dereference

This trivially corrects mesa 3ca1c221, which introduced a check that
crashes when a match is not found.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95005
Fixes: piglit.spec.glsl-1_50.compiler.interface-blocks-name-reused-globally-4.vert
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/ast_to_hir.cpp