mesa: fix segfault in glUniformSubroutinesuiv()
mesa: fix segfault in glUniformSubroutinesuiv()

From Section 7.9 (SUBROUTINE UNIFORM VARIABLES) of the OpenGL
4.5 Core spec:

   "The command

       void UniformSubroutinesuiv(enum shadertype, sizei count,
                                  const uint *indices);

   will load all active subroutine uniforms for shader stage
   shadertype with subroutine indices from indices, storing
   indices[i] into the uniform at location i. The indices for
   any locations between zero and the value of
   ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS minus one which are not
   used will be ignored."

V2: simplify NULL check suggested by Jason.

Acked-by: Jason Ekstrand <68c46a606457643eab92053c1c05574abb26f861@jlekstrand.net>
Reviewed-by: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@redhat.com>
Cc: d2f8330c9d523fef404037885ae974fdb513f6b5@lists.freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=93731

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler