summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index f23c2b1..f577236 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -1088,7 +1088,7 @@ sub compute_review {
my %seen;
- if ( $journey->{rt_duration} ) {
+ if ( $journey->{rt_duration} and $journey->{rt_duration} > 0 ) {
if ( not $longest_t
or $journey->{rt_duration} > $longest_t->{rt_duration} )
{
@@ -1163,7 +1163,7 @@ sub compute_review {
}
}
- if ( $journey->{rt_duration} and $journey->{sched_duration} ) {
+ if ( $journey->{rt_duration} and $journey->{sched_duration} and $journey->{rt_duration} > 0 and $journey->{sched_duration} > 0 ) {
my $slowdown = $journey->{rt_duration} - $journey->{sched_duration};
my $speedup = -$slowdown;
if (