Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid to dereference a null pointer with --log=surf_route.thres:debug.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 13 Sep 2012 12:57:18 +0000 (14:57 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 17 Sep 2012 08:17:38 +0000 (10:17 +0200)
src/surf/surf_routing.c

index e25114f..8561b86 100644 (file)
@@ -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;