Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[pvs] The 'mc_model_checker' pointer was utilized before it was verified against...
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Nov 2020 21:07:07 +0000 (22:07 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Nov 2020 21:12:09 +0000 (22:12 +0100)
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_);