connecting trains: fix warning when encountering unknown platforms

This commit is contained in:
Daniel Friesel 2022-12-26 20:47:43 +01:00
parent d256a1956a
commit 68bc276bff
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005

View file

@ -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 ) {