Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
with GTNetS, the routing is not within to SimGrid but externalized
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 9 Aug 2009 13:10:59 +0000 (13:10 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 9 Aug 2009 13:10:59 +0000 (13:10 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6543 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/workstation.c

index 7a56c27..2827aaf 100644 (file)
@@ -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);
   }