From a85039363bec543231d2d09f724a26f03fc32776 Mon Sep 17 00:00:00 2001 From: m-kro Date: Mon, 5 Feb 2024 15:13:21 +0100 Subject: [PATCH] stop foe lane search for incomplete routes ref #14201 Signed-off-by: m-kro --- src/microsim/devices/MSDevice_SSM.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/microsim/devices/MSDevice_SSM.cpp b/src/microsim/devices/MSDevice_SSM.cpp index afe9386d73e4..14cc90b8cf75 100644 --- a/src/microsim/devices/MSDevice_SSM.cpp +++ b/src/microsim/devices/MSDevice_SSM.cpp @@ -2907,6 +2907,10 @@ MSDevice_SSM::findFoeConflictLane(const MSVehicle* foe, const MSLane* egoConflic } MSLane* const nextNonInternalLane = *laneIter; const MSLink* const link = foeLane->getLinkTo(nextNonInternalLane); + if (link == nullptr) { + // encountered incomplete route + return nullptr; + } // Set foeLane to first internal lane on the next junction foeLane = link->getViaLane(); assert(foeLane == 0 || foeLane->isInternal());