diff options
-rw-r--r-- | src/compiler/glsl/linker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index d187b66ab53..9f1d6b70cb2 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1176,6 +1176,12 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog, for (unsigned k = 0; k <= i; k++) { delete[] InterfaceBlockStageIndex[k]; } + + /* Reset the block count. This will help avoid various segfaults + * from api calls that assume the array exists due to the count + * being non-zero. + */ + *num_blks = 0; return false; } |