X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/759877a05a38c52ad230a63ed421629c528d1101..04446484b754854fb4e9cd3ef649bdc56dcc5d86:/src/surf/surf_routing.c diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 42a3b989af..c94cd5ca9c 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -1072,7 +1072,8 @@ static e_surf_network_element_type_t get_network_element_type(const char *name) { network_element_info_t rc = NULL; - rc = xbt_dict_get(global_routing->where_network_elements, name); + rc = xbt_dict_get_or_null(global_routing->where_network_elements, name); + if(!rc) return SURF_NETWORK_ELEMENT_NULL; return rc->rc_type; }