Previously, vec3 b = {{ 1.0, 2.0, 3.0 }} would cause a segfault because the we dereferenced the constructor_type field which was NULL.
Arrays, structs, and matrices were unaffected. --- src/glsl/ast_function.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 3918263..e34c1dd 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -1707,6 +1707,11 @@ ast_aggregate_initializer::hir(exec_list *instructions, void *ctx = state; YYLTYPE loc = this->get_location(); const char *name; + + if (!this->constructor_type) { + _mesa_glsl_error(&loc, state, "type of C-style initializer unknown"); + return ir_rvalue::error_value(ctx); + } const glsl_type *const constructor_type = this->constructor_type->glsl_type(&name, state); -- 1.8.1.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev