summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-20 16:49:03 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-28 18:22:54 -0700
commit73986a7a262807ab2cfd6d46ae17cfc7a30cdfec (patch)
tree1352b931c0c43e537926de2f788b307079aad8b5 /ast_to_hir.cpp
parent1d28b617ba66cfcb1641c9f516146d51aa82b118 (diff)
Ensure that structure fields have non-NULL types
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++;
}