summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-26 20:47:43 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-26 20:47:43 +0100
commit68bc276bff544355180437c6bb15e9a495027bab (patch)
treebe22ff065b69e09fcde4d055cfe2e5ae653fbed3 /lib/Travelynx/Controller/Traveling.pm
parentd256a1956a265621d799e5df42e53c98a6d2c855 (diff)
connecting trains: fix warning when encountering unknown platforms
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 90f858c..aa25e5c 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -206,9 +206,13 @@ sub get_connecting_trains_p {
$train->{message_id} = { map { $_ => 1 } @message_ids };
my $interchange_duration;
if ( exists $stationinfo->{i} ) {
- $interchange_duration
- = $stationinfo->{i}{$arr_platform}
- { $train->platform };
+ if ( defined $arr_platform
+ and defined $train->platform )
+ {
+ $interchange_duration
+ = $stationinfo->{i}{$arr_platform}
+ { $train->platform };
+ }
$interchange_duration //= $stationinfo->{i}{"*"};
}
if ( defined $interchange_duration ) {