Fix a warning about uninitialized values.
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 31 Jan 2009 14:15:18 +0000 (15:15 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 31 Jan 2009 14:15:18 +0000 (15:15 +0100)
perl/Sesse/pr0n/Index.pm

index ee0e31163bf4d510efdd551651cdca5ee34c9683..70ac117d1eb4f2cb6d2261d351a722cadc39e75c 100644 (file)
@@ -96,7 +96,7 @@ sub handler {
                if (($s eq "num" || $s eq "xres" || $s eq "yres") && defined($val) && $val == -1) {
                        $settings{$s} = $val;
                }
                if (($s eq "num" || $s eq "xres" || $s eq "yres") && defined($val) && $val == -1) {
                        $settings{$s} = $val;
                }
-               if ($s eq "model" || $s eq "lens" || $s eq "author") {
+               if (($s eq "model" || $s eq "lens" || $s eq "author") && defined($val)) {
                        $settings{$s} = Sesse::pr0n::Common::pretty_unescape($val);
                }
        }
                        $settings{$s} = Sesse::pr0n::Common::pretty_unescape($val);
                }
        }