diff options
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 11fdbb2390..0ec4e6523b 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -288,9 +288,20 @@ sub can_contain_deferred($) return 1 if ($type->{TYPE} eq "DECLARE"); # assume the worst - foreach my $x (@{$type->{DATA}->{ELEMENTS}}) { - return 1 if ($x->{POINTERS}); - return 1 if (can_contain_deferred ($x)); + if ($type->{TYPE} eq "TYPEDEF") { + return 0 unless defined($type->{DATA}->{ELEMENTS}); + + foreach my $x (@{$type->{DATA}->{ELEMENTS}}) { + return 1 if ($x->{POINTERS}); + return 1 if (can_contain_deferred ($x)); + } + } else { + return 0 unless defined($type->{ELEMENTS}); + + foreach my $x (@{$type->{ELEMENTS}}) { + return 1 if ($x->{POINTERS}); + return 1 if (can_contain_deferred ($x)); + } } return 0; |