From f7d854f7d841d5ddd0375eeeaafcdf4d51616a9a Mon Sep 17 00:00:00 2001 From: mquinson Date: Sun, 9 Aug 2009 13:10:59 +0000 Subject: [PATCH] with GTNetS, the routing is not within to SimGrid but externalized git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6543 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/workstation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 7a56c2723a..2827aaf122 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) + xbt_dict_get_or_null(used_routing->host_id,name); workstation_new(name, cpu, id?*id:0); } -- 2.20.1