X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b0369916c688e5342762f7914dbf5868fac309c6..f7d8be2e2c777489cbf95e693dfdcd6c89741962:/src/surf/workstation.c diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 7a56c2723a..d445ecfc0b 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -44,7 +44,9 @@ void create_workstations(void) void *cpu = NULL; xbt_dict_foreach(surf_model_resource_set(surf_cpu_model), cursor, name, cpu) { - int *id = xbt_dict_get_or_null(used_routing->host_id,name); + int *id = NULL; + if (used_routing && used_routing->host_id) + id = xbt_dict_get_or_null(used_routing->host_id,name); workstation_new(name, cpu, id?*id:0); }