diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-11-24 19:21:42 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-11-24 19:21:42 +0000 |
commit | 16e7ca9d72f7d1c24a12014ac482948e17be8d3f (patch) | |
tree | e93e063ab2d7e2c9725f1d4c1dac8873206ce45f /src/mesa/shader/slang/slang_compile_variable.c | |
parent | e49d06e61955208b9cd3e18469034e7447394b95 (diff) |
call slang_variable_construct() inside slang_variable_scope_grow()
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_variable.c')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_variable.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index a37deddff1..a8a2d6aa6a 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -184,7 +184,7 @@ slang_variable_scope_copy(slang_variable_scope * x, /** * Grow the variable list by one. - * \return pointer to space for the new variable. + * \return pointer to space for the new variable (will be initialized) */ slang_variable * slang_variable_scope_grow(slang_variable_scope *scope) @@ -196,7 +196,12 @@ slang_variable_scope_grow(slang_variable_scope *scope) (n + 1) * sizeof(slang_variable)); if (!scope->variables) return NULL; + scope->num_variables++; + + if (!slang_variable_construct(scope->variables + n)) + return NULL; + return scope->variables + n; } |