summaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c2
1 files changed, 2 insertions, 0 deletions
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;
}