Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check if "coord" is not null before do strcmp
authorJean-Baptiste Hervé <jean-baptiste.herve@esial.net>
Thu, 2 Aug 2012 15:59:24 +0000 (17:59 +0200)
committerJean-Baptiste Hervé <jean-baptiste.herve@esial.net>
Thu, 2 Aug 2012 15:59:24 +0000 (17:59 +0200)
src/surf/surf_routing.c

index 098651b..1049787 100644 (file)
@@ -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;