-
- if (process && kill_time > SIMIX_get_clock()) {
- if (simix_global->kill_process_function)
- surf_timer_model->extension_public->set(start_time, (void *)
- simix_global->kill_process_function,
- process);
- else
- surf_timer_model->extension_public->set(kill_time, (void *)
- &SIMIX_process_kill,
- (void *) process);
+ /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
+ if (!process) {
+ xbt_free(parse_host);
+ return;
+ }
+ if (kill_time > SIMIX_get_clock()) {
+ if (simix_global->kill_process_function)
+ surf_timer_model->extension.timer.set(start_time, (void *)
+ simix_global->kill_process_function,
+ process);
+ else
+ surf_timer_model->extension.timer.set(kill_time, (void *)
+ &SIMIX_process_kill,
+ (void *) process);