From 843bda6c658a206ebd22778a0576f101782bcfe9 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 13 Sep 2012 14:57:18 +0200 Subject: [PATCH] Avoid to dereference a null pointer with --log=surf_route.thres:debug. --- src/surf/surf_routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index e25114f081..8561b868b5 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -521,8 +521,8 @@ static void _get_route_and_latency(sg_routing_edge_t src, sg_routing_edge_t dst, s_sg_platf_route_cbarg_t route; memset(&route,0,sizeof(route)); - XBT_DEBUG("Solve route/latency \"%s\" to \"%s\"", src->name, dst->name); xbt_assert(src && dst, "bad parameters for \"_get_route_latency\" method"); + XBT_DEBUG("Solve route/latency \"%s\" to \"%s\"", src->name, dst->name); /* Find how src and dst are interconnected */ AS_t common_father, src_father, dst_father; -- 2.20.1