Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simgrid / host.cpp
index 9e26ad8..cbe140a 100644 (file)
@@ -67,7 +67,7 @@ xbt_dynar_t sg_hosts_as_dynar(void)
   const char* name = nullptr;
   simgrid::s4u::Host* host = nullptr;
   xbt_dict_foreach(host_list, cursor, name, host)
-    if(routing_get_network_element_type(name) == SURF_NETWORK_ELEMENT_HOST)
+    if (host && host->pimpl_netcard && host->pimpl_netcard->getRcType() == SURF_NETWORK_ELEMENT_HOST)
        xbt_dynar_push(res, &host);
   return res;
 }