summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/profile.c b/core/profile.c
index 6fafb3017..697ebe1c0 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -990,6 +990,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
if (!in_planner())
deco_state->deco_time = 0;
struct deco_state *cache_data_initial = NULL;
+ lock_planner();
/* For VPM-B outside the planner, cache the initial deco state for CVA iterations */
if (decoMode() == VPMB) {
cache_deco_state(&cache_data_initial);
@@ -1135,6 +1136,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
#if DECO_CALC_DEBUG & 1
dump_tissues();
#endif
+ unlock_planner();
}
#endif