From: Jean-Baptiste Hervé Date: Thu, 2 Aug 2012 15:59:24 +0000 (+0200) Subject: Check if "coord" is not null before do strcmp X-Git-Tag: v3_8~220 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6b27851a012ce270cabc69c5e162ef2991e66065 Check if "coord" is not null before do strcmp --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 098651b231..1049787e34 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -206,7 +206,7 @@ static void parse_S_router(sg_platf_router_cbarg_t router) xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, (void *) info); XBT_DEBUG("Having set name '%s' id '%d'",router->id,info->id); - if (strcmp(router->coord, "")) { + if (router->coord && strcmp(router->coord, "")) { unsigned int cursor; char*str;