mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
glsl: add missing null check in tfeedback_decl::init()
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
a82b29d526
commit
6e56eaf7b7
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue