Skip to content

Commit

Permalink
fix crash on calc remainings with start and end approach point to dif…
Browse files Browse the repository at this point in the history
…ferent segments
  • Loading branch information
mg4gh committed Sep 26, 2023
1 parent 20732f1 commit 3469ec1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mgmap/src/main/java/mg/mgmap/generic/model/TrackLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public double getRemainingDistance(TrackLogRefApproach ref){
}

public double getRemainingDistance(TrackLogRefApproach ref1, TrackLogRefApproach ref2){
if (ref1.segmentIdx != ref2.segmentIdx) return -1;
if (ref2.getEndPointIndex() < ref1.getEndPointIndex()){
TrackLogRefApproach ref = ref1;
ref1 = ref2;
Expand Down

0 comments on commit 3469ec1

Please sign in to comment.