qmail_deliverable: test variable if defined before accessing

This commit is contained in:
Matt Simerson 2012-06-27 20:17:00 -04:00 committed by Matt Simerson
parent 3127f4d4c5
commit 74d97d312e

View File

@ -77,7 +77,7 @@ sub register {
$self->log(LOGWARN, "Odd number of arguments, using default config"); $self->log(LOGWARN, "Odd number of arguments, using default config");
} else { } else {
my %args = @args; my %args = @args;
if ($args{server} =~ /^smtproutes:/) { if ($args{server} && $args{server} =~ /^smtproutes:/) {
my ($fallback, $port) = $args{server} =~ /:(?:(.*?):?)(\d+)/; my ($fallback, $port) = $args{server} =~ /:(?:(.*?):?)(\d+)/;