summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ast_function.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 39182639f33..e34c1ddba86 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);