Skip to content

Commit

Permalink
do not free simulation in reb_simulation_create_from_simulationarchiv…
Browse files Browse the repository at this point in the history
…e_with_messages (is freed later)
  • Loading branch information
hannorein committed Jun 24, 2024
1 parent 2208b85 commit a02fa3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simulationarchive.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ void reb_simulation_create_from_simulationarchive_with_messages(struct reb_simul
// Read SA snapshot
if(fseek(inf, sa->offset[snapshot], SEEK_SET)){
*warnings |= REB_SIMULATION_BINARY_ERROR_SEEK;
reb_simulation_free(r);
//reb_simulation_free(r);
return;
}
if (r->simulationarchive_version<2){
*warnings |= REB_SIMULATION_BINARY_ERROR_OLD;
reb_simulation_free(r);
//reb_simulation_free(r);
return;
}else{
// Version 2 or higher
Expand Down

0 comments on commit a02fa3d

Please sign in to comment.