Ensure that structure fields have non-NULL types
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 20 Apr 2010 23:49:03 +0000 (16:49 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Apr 2010 01:22:54 +0000 (18:22 -0700)
ast_to_hir.cpp

index a29a49d..9b39d1f 100644 (file)
@@ -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++;
       }