X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/40dc178ab282a23a717380eedcfc0336134a1dc5..c97c73bdc69512d26f4e807c1e6f417d3b1db874:/src/plugins/host_energy.cpp diff --git a/src/plugins/host_energy.cpp b/src/plugins/host_energy.cpp index b68edc8aee..0b1ed29b96 100644 --- a/src/plugins/host_energy.cpp +++ b/src/plugins/host_energy.cpp @@ -515,7 +515,7 @@ static void on_simulation_end() double total_energy = 0.0; // Total energy consumption (whole platform) double used_hosts_energy = 0.0; // Energy consumed by hosts that computed something for (simgrid::s4u::Host const* host : simgrid::s4u::Engine::get_instance()->get_all_hosts()) { - if (dynamic_cast(host) == nullptr) { // Ignore virtual machines + if (host && dynamic_cast(host) == nullptr) { // Ignore virtual machines double energy = host->extension()->get_consumed_energy(); total_energy += energy; if (host->extension()->host_was_used_)