X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ed29440add2e56e7e374bb44648075737bd4237d..f4d034af50e34fbac8e6cf57d767f6704dfaf49c:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index de54e4373c..807bfaf8d5 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -233,7 +233,9 @@ int find_model_description(s_surf_model_description_t * table, if (!strcmp(name, table[i].name)) { return i; } - name_list = strdup(table[0].name); + if (!table[0].name) + xbt_die("No model is valid! This is a bug."); + name_list = xbt_strdup(table[0].name); for (i = 1; table[i].name; i++) { name_list = xbt_realloc(name_list,