diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index f3c1c2870336827893a4a41f2320c33582a7fb26..94052ed4a84cca8f45792f563c6227890de50eca 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -50,7 +50,7 @@ sub new { my $train_no = $product->{prodCtx}{num}; my $cat = $product->{prodCtx}{catOut}; my $catlong = $product->{prodCtx}{catOutL}; - if ( $name eq $cat ) { + if ( $name and $cat and $name eq $cat ) { $name .= ' ' . $product->{nameS}; } if ( defined $train_no and not $train_no ) {