pidl/python: Fix bug accidently filling in the body of enums/bitmaps without body.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 13 Jan 2008 14:11:28 +0000 (15:11 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jan 2008 18:53:04 +0000 (19:53 +0100)
source/pidl/lib/Parse/Pidl/Samba4/Python.pm

index ae4931571a468493c86625c130dc04726f4e4ac6..d0a5bbd7e3f18d551b1c64b89d138ae4bc81ada7 100644 (file)
@@ -79,6 +79,8 @@ sub EnumAndBitmapConsts($$$)
 {
        my ($self, $name, $d) = @_;
 
+       return unless (defined($d->{ELEMENTS}));
+
        foreach my $e (@{$d->{ELEMENTS}}) {
                $e =~ /^([A-Za-z0-9_]+)=(.*)$/;
                my $cname = $1;