A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more explicit message on problem
[simgrid.git]
/
src
/
surf
/
workstation.c
diff --git
a/src/surf/workstation.c
b/src/surf/workstation.c
index
7a56c27
..
d445ecf
100644
(file)
--- 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) {
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);
}
workstation_new(name, cpu, id?*id:0);
}