avoid uninitialized value

This can happen when a new field,
such as the new lasttry, is added.
master
Joey Hess 2008-12-19 17:57:09 -05:00
parent 301733ba13
commit 61f8ea7f1d
1 changed files with 2 additions and 1 deletions

View File

@ -343,7 +343,8 @@ sub savestate () {
push @line, "tag=$_" foreach @{$data->{tags}};
}
else {
push @line, "$field=".$data->{$field};
push @line, "$field=".$data->{$field}
if defined $data->{$field};
}
}
print OUT join(" ", @line)."\n" || error("write $newfile: $!", $cleanup);