summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-26 21:39:24 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-26 21:39:24 +0100
commitfe6340abeb2b1b483ac6ed346474676f3984bdda (patch)
treef788e6eff19accdb73d21685ff8f85b0f96f9000 /lib
parentf2f58ab50724b12404f053113822d35357084179 (diff)
Handle undefined user data in conncetion suggestion with no previous journey1.12.1
Closes #30
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 3cfc675..de6b1bc 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -2397,7 +2397,9 @@ sub startup {
$eva = $status->{arr_eva};
$exclude_via = $status->{dep_name};
$exclude_train_id = $status->{train_id};
- $exclude_before = $status->{real_arrival}->epoch;
+ if ( $status->{real_arrival} ) {
+ $exclude_before = $status->{real_arrival}->epoch;
+ }
}
}
@@ -2431,6 +2433,7 @@ sub startup {
next;
}
if ( $exclude_before
+ and $train->departure
and $train->departure->epoch < $exclude_before )
{
next;