X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c620ebc670a6dd5c6605e643fb4cbc7e61b991d4..3e978b7ee3fb648f19de9aeb4450a98e30dd437b:/src/simix/SynchroExec.cpp diff --git a/src/simix/SynchroExec.cpp b/src/simix/SynchroExec.cpp index 31d8dd499c..99d2b74fa2 100644 --- a/src/simix/SynchroExec.cpp +++ b/src/simix/SynchroExec.cpp @@ -9,7 +9,8 @@ simgrid::simix::Exec::Exec(const char*name, sg_host_t hostarg) { - this->name = name; + if (name) + this->name = name; this->state = SIMIX_RUNNING; this->host = hostarg; } @@ -54,10 +55,10 @@ void simgrid::simix::Exec::post() if (surf_exec) { surf_exec->unref(); - surf_exec = NULL; + surf_exec = nullptr; } /* If there are simcalls associated with the synchro, then answer them */ - if (xbt_fifo_size(simcalls)) + if (!simcalls.empty()) SIMIX_execution_finish(this); }