X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/23141ea49d9f51ecda69abe8cd02736b92254726..e3bb3fa0da0fe033ac8ff471ea382010177855c8:/src/msg/msg_vm.cpp diff --git a/src/msg/msg_vm.cpp b/src/msg/msg_vm.cpp index 2198f6d593..46dae391f7 100644 --- a/src/msg/msg_vm.cpp +++ b/src/msg/msg_vm.cpp @@ -196,7 +196,7 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name) { /* make sure the VM of the same name does not exit */ { - simgrid::s4u::Host* ind_host_tmp = (simgrid::s4u::Host*) xbt_dict_get_or_null(host_list, name); + simgrid::s4u::Host* ind_host_tmp = sg_host_by_name(name); if (ind_host_tmp != nullptr && sg_host_simix(ind_host_tmp) != nullptr) { XBT_ERROR("host %s already exits", name); return nullptr;