ignore undefined values when we filter
authorDon Armstrong <don@donarmstrong.com>
Tue, 13 Apr 2010 01:40:48 +0000 (18:40 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 13 Apr 2010 01:40:48 +0000 (18:40 -0700)
bugreport

index facc662..c8cc82d 100755 (executable)
--- a/bugreport
+++ b/bugreport
@@ -173,7 +173,8 @@ sub FilterPackages($) {
        my $filter = shift;             # Distribution we want to keep
 
        for my $p (sort keys %scanlib::packagelist) {
-               delete $scanlib::packagelist{$p} unless ($scanlib::section{$p} =~ m/^$filter/);
+               delete $scanlib::packagelist{$p} unless (defined $scanlib::section{$p} and
+                                                        $scanlib::section{$p} =~ m/^$filter/);
        }
 }