From a02fa3d4b3dc4b95184e011755c6feb2b7376e7f Mon Sep 17 00:00:00 2001 From: Hanno Rein Date: Mon, 24 Jun 2024 12:09:54 -0400 Subject: [PATCH] do not free simulation in reb_simulation_create_from_simulationarchive_with_messages (is freed later) --- src/simulationarchive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulationarchive.c b/src/simulationarchive.c index c494f3740..47e3a8b7d 100644 --- a/src/simulationarchive.c +++ b/src/simulationarchive.c @@ -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