From 3c3e6f4613478826b4563256814b791101b92bb3 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 5 Mar 2014 10:30:51 +0100 Subject: [PATCH] Don't dereference null pointer. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Thanks to Stéphane Castelli. --- src/surf/surf_routing_generic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/surf/surf_routing_generic.cpp b/src/surf/surf_routing_generic.cpp index 908e46ecb8..92133dd209 100644 --- a/src/surf/surf_routing_generic.cpp +++ b/src/surf/surf_routing_generic.cpp @@ -234,7 +234,8 @@ sg_platf_route_cbarg_t AsGeneric::getBypassRoute(RoutingEdgePtr src, if (src == NULL || dst == NULL) xbt_die("Ask for route \"from\"(%s) or \"to\"(%s) no found at AS \"%s\"", - src->getName(), dst->getName(), p_name); + src ? src->getName() : "(null)", + dst ? dst->getName() : "(null)", p_name); src_as = src->getRcComponent(); dst_as = dst->getRcComponent(); -- 2.20.1