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