Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
extra check on actions
[simgrid.git] / src / simdag / sd_global.cpp
index 9fe8020..44767bc 100644 (file)
@@ -57,7 +57,7 @@ std::set<SD_task_t>* simulate(double how_long){
     /* let's see which tasks are done */
     for (auto const& model : *all_existing_models) {
       surf_action_t action = surf_model_extract_done_action_set(model);
-      while (action != nullptr) {
+      while (action != nullptr && action->getData() != nullptr) {
         SD_task_t task = static_cast<SD_task_t>(action->getData());
         XBT_VERB("Task '%s' done", SD_task_get_name(task));
         SD_task_set_state(task, SD_DONE);
@@ -173,7 +173,7 @@ void SD_init_nocheck(int *argc, char **argv)
  * Do --help on any simgrid binary to see the list of currently existing configuration variables, and
  * see Section @ref options.
  *
- * Example: SD_config("host/model","default");
+ * Example: SD_config("host/model","default")
  */
 void SD_config(const char *key, const char *value){
   xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");