Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[pvs] The 'mc_model_checker' pointer was utilized before it was verified against...
[simgrid.git] / src / mc / mc_smx.cpp
index 4049cbb..6c8e630 100644 (file)
@@ -135,10 +135,11 @@ const char* MC_smx_actor_get_host_name(smx_actor_t actor)
 
 const char* MC_smx_actor_get_name(smx_actor_t actor)
 {
-  const simgrid::mc::RemoteSimulation* process = &mc_model_checker->get_remote_simulation();
   if (mc_model_checker == nullptr)
     return actor->get_cname();
 
+  const simgrid::mc::RemoteSimulation* process = &mc_model_checker->get_remote_simulation();
+
   simgrid::mc::ActorInformation* info = actor_info_cast(actor);
   if (info->name.empty()) {
     simgrid::xbt::string_data string_data = simgrid::xbt::string::to_string_data(actor->name_);