diff options
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index cdc85f3413b..126786cfaf4 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2530,6 +2530,11 @@ _mesa_UniformSubroutinesuiv(GLenum shadertype, GLsizei count, i = 0; do { struct gl_uniform_storage *uni = sh->SubroutineUniformRemapTable[i]; + if (uni == NULL) { + i++; + continue; + } + int uni_count = uni->array_elements ? uni->array_elements : 1; int j, k; @@ -2557,6 +2562,11 @@ _mesa_UniformSubroutinesuiv(GLenum shadertype, GLsizei count, i = 0; do { struct gl_uniform_storage *uni = sh->SubroutineUniformRemapTable[i]; + if (uni == NULL) { + i++; + continue; + } + int uni_count = uni->array_elements ? uni->array_elements : 1; memcpy(&uni->storage[0], &indices[i], |