Skip to content

Commit

Permalink
Fix infinite loop when input for SMASH is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
latessa committed Sep 19, 2024
1 parent f600753 commit 1c09483
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/afterburner/SmashWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ class AfterburnerModus : public smash::ListModus {
double initial_conditions(smash::Particles *particles,
const smash::ExperimentParameters &) {
add_JS_hadrons_to_smash_particles(jetscape_hadrons_[event_number_], *particles);
backpropagate_to_same_time(*particles);
if (particles->size() > 0) {
backpropagate_to_same_time(*particles);
} else {
start_time_ = 0.0;
}
event_number_++;
return start_time_;
}
Expand Down

0 comments on commit 1c09483

Please sign in to comment.