summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index a29a49d98d..9b39d1f05b 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -2320,7 +2320,8 @@ ast_struct_specifier::hir(exec_list *instructions,
? process_array_type(decl_type, decl->array_size, state)
: decl_type;
- fields[i].type = field_type;
+ fields[i].type = (field_type != NULL)
+ ? field_type : glsl_type::error_type;
fields[i].name = decl->identifier;
i++;
}