From bb91d65af0044c3a0d1108721937a002285d6948 Mon Sep 17 00:00:00 2001 From: Paris DOUADY Date: Sat, 3 Apr 2021 21:49:49 +0200 Subject: [PATCH] only return terminal when arrived --- egregoria/src/map_dynamic/itinerary.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/egregoria/src/map_dynamic/itinerary.rs b/egregoria/src/map_dynamic/itinerary.rs index 4d0b6654..f2d70aa8 100644 --- a/egregoria/src/map_dynamic/itinerary.rs +++ b/egregoria/src/map_dynamic/itinerary.rs @@ -225,6 +225,9 @@ impl Itinerary { } pub fn get_terminal(&self) -> Option { + if !self.is_terminal() { + return None; + } match &self.kind { ItineraryKind::None | ItineraryKind::WaitUntil(_)