From a9ceecc2e3646432d6688d04b592c48f9c63ae65 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 29 Aug 2017 11:41:30 +0200 Subject: Run variations calculation in background but there are still side effects and thus it crashes. Signed-off-by: Robert C. Helling --- core/planner.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/planner.c') diff --git a/core/planner.c b/core/planner.c index 1e5f5db8d..a137753b2 100644 --- a/core/planner.c +++ b/core/planner.c @@ -685,6 +685,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec int decostopcounter = 0; set_gf(diveplan->gflow, diveplan->gfhigh); + lock_planner(); set_vpmb_conservatism(diveplan->vpmb_conservatism); if (!diveplan->surface_pressure) diveplan->surface_pressure = SURFACE_PRESSURE; @@ -1082,6 +1083,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec free(stoplevels); free(gaschanges); free(bottom_cache); + unlock_planner(); return decodive; } -- cgit v1.2.3-70-g09d2