Skip to content

Commit

Permalink
fix potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mrieser committed Jun 13, 2024
1 parent 23ec96b commit 9360e6c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,10 @@ private void observeArrival(PathElement pe, RaptorObserver observer) {
backpointer = backpointer.comingFrom;
}
TransitStopFacility departureStopFacility = backpointer.toRouteStop.routeStop.getStopFacility();
TransitStopFacility arrivalStopFacility = pe.toRouteStop.routeStop.getStopFacility();
observer.arrivedAtStop(pe.firstDepartureTime, arrivalStopFacility, pe.arrivalTime, pe.transferCount, () -> createRaptorRoute(departureStopFacility, arrivalStopFacility, pe, pe.firstDepartureTime));
if (departureStopFacility != null) {
TransitStopFacility arrivalStopFacility = pe.toRouteStop.routeStop.getStopFacility();
observer.arrivedAtStop(pe.firstDepartureTime, arrivalStopFacility, pe.arrivalTime, pe.transferCount, () -> createRaptorRoute(departureStopFacility, arrivalStopFacility, pe, pe.firstDepartureTime));
}
}
}

Expand Down

0 comments on commit 9360e6c

Please sign in to comment.