From 44547b884aadd80f6486ca5ac8f072c815e9c920 Mon Sep 17 00:00:00 2001 From: m-kro Date: Mon, 16 Oct 2023 11:11:36 +0200 Subject: [PATCH] avoid access to invalid edge ref #13932 Signed-off-by: m-kro --- src/netimport/NIImporter_VISUM.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/netimport/NIImporter_VISUM.cpp b/src/netimport/NIImporter_VISUM.cpp index 43c70d281fc..f774a3c1067 100644 --- a/src/netimport/NIImporter_VISUM.cpp +++ b/src/netimport/NIImporter_VISUM.cpp @@ -1164,7 +1164,10 @@ void NIImporter_VISUM::parse_stopPoints() { WRITE_WARNINGF(TL("Ignoring stopping place '%' without node informatio"), id); } else { NBEdge* edge = getNamedEdge(KEYS.getString(VISUM_LINKNO)); - if (from != nullptr) { + if (edge == nullptr) { + WRITE_WARNINGF(TL("Ignoring stopping place '%' with invalid edge reference '%'"), id, edgeID); + return; + } else if (from != nullptr) { if (edge->getToNode() == from) { NBEdge* edge2 = myNetBuilder.getEdgeCont().retrieve("-" + edge->getID()); if (edge2 == nullptr) {