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 a29a49d98ddc4c656dddbf665d70d153e588c284..9b39d1f05b9a52433837ce7a603d8f216698da35 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++;
       }