]> git.donarmstrong.com Git - debbugs.git/commitdiff
* check for source definedness to forestall warning
authorDon Armstrong <don@donarmstrong.com>
Tue, 23 Feb 2010 19:35:52 +0000 (11:35 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 23 Feb 2010 19:35:52 +0000 (11:35 -0800)
Debbugs/Packages.pm

index f43e8b54e20cf9b00ad3948527ad7f7dbabeb74d..b4b5ef7411fa18e821a4c5244a2a246506e1249d 100644 (file)
@@ -223,8 +223,8 @@ sub binary_to_source{
        }
        # avoid autovivification
        my $bin = $_binarytosource{$binary};
+       next unless defined $bin;
        if (not @versions) {
-           next unless defined $bin;
            for my $ver (keys %{$bin}) {
                for my $ar (keys %{$bin->{$ver}}) {
                    my $src = $bin->{$ver}{$ar};
@@ -283,6 +283,9 @@ sub binary_to_source{
     if ($param{source_only}) {
        my %uniq;
        for my $s (@source) {
+           # we shouldn't need to do this, but do this temporarily to
+           # stop the warning.
+           next unless defined $s->[0];
            $uniq{$s->[0]} = 1;
        }
        @result = sort keys %uniq;