From: Arnaud Giersch Date: Wed, 25 Nov 2020 21:07:07 +0000 (+0100) Subject: [pvs] The 'mc_model_checker' pointer was utilized before it was verified against... X-Git-Tag: v3.26~107 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/87e1dfe4eb3803206675bb5d6e6e6e1e845e1fd8 [pvs] The 'mc_model_checker' pointer was utilized before it was verified against nullptr. --- diff --git a/src/mc/mc_smx.cpp b/src/mc/mc_smx.cpp index 4049cbbb70..6c8e6304b7 100644 --- a/src/mc/mc_smx.cpp +++ b/src/mc/mc_smx.cpp @@ -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_);