} else {
# it's a reply, look in the ping list for this one
- my $ref = $ping{$thing->{id}} if exists $thing->{id};
+ my $ref;
+ $ref = $ping{$thing->{id}} if exists $thing->{id};
$ref = find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})) unless $ref;
if ($ref) {
my $t = tv_interval($ref->{t}, [ gettimeofday ]);