From f1aa3fd914346725adf940e6138702db01b77eb0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 Apr 2017 12:55:18 +0000 Subject: [PATCH] sg-report-flight: Do not try to print nonexistent FirstTip info The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}. Defend $pinfo against the use of an autovivified empty hashref. Signed-off-by: Ian Jackson --- sg-report-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg-report-flight b/sg-report-flight index 7d2bc660..5b8f67a3 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -586,7 +586,7 @@ sub print_pushgate_summary () { my $f = $info->{$flightkey}; my $count = $info->{$countkey}; bodyprintf "%-20s", $what; - if ($f) { + if ($f && %$f) { bodyprintf(" %6d %s %4d days", $f->{flight}, show_abs_time($f->{started}), -- 2.39.5