Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please Sonar and scan-build.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 24 May 2023 12:38:50 +0000 (14:38 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 24 May 2023 16:27:25 +0000 (18:27 +0200)
src/plugins/host_energy.cpp

index 47bfda4..d2f5dc8 100644 (file)
@@ -514,6 +514,7 @@ void sg_host_energy_plugin_init()
       simgrid::s4u::Host* host = activity.get_host();
       if (const auto* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host))
         host = vm->get_pm();
+      xbt_assert(host != nullptr);
       host->extension<HostEnergy>()->update();
     }
   });