diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/link_varyings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 54ceae1b9eb..a738e2f3825 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -318,6 +318,11 @@ tfeedback_decl::init(struct gl_context *ctx, const void *mem_ctx, const char *base_name_end; long subscript = parse_program_resource_name(input, &base_name_end); this->var_name = ralloc_strndup(mem_ctx, input, base_name_end - input); + if (this->var_name == NULL) { + _mesa_error_no_memory(__func__); + return; + } + if (subscript >= 0) { this->array_subscript = subscript; this->is_subscripted = true; |