diff options
Diffstat (limited to 'source4/build/pidl/parser.pm')
-rw-r--r-- | source4/build/pidl/parser.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index e06f3d4288..9d05f7f922 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -115,7 +115,9 @@ sub struct_alignment if ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "STRUCT") { $a = struct_alignment($structs{$e->{TYPE}}->{DATA}); } elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "UNION") { - $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + if (defined $structs{$e->{TYPE}}->{DATA}) { + $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + } } } else { $a = util::type_align($e); @@ -140,6 +142,10 @@ sub union_alignment foreach my $e (@{$u->{DATA}}) { my $a = 1; + if ($e->{TYPE} eq "EMPTY") { + next; + } + if (!util::need_wire_pointer($e) && defined $structs{$e->{DATA}->{TYPE}}) { my $s = $structs{$e->{DATA}->{TYPE}}; |