Don't comput plan variations when not in the planner

Fixes #565

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-09-15 20:54:40 +02:00 committed by Dirk Hohndel
parent dc0f011920
commit 58b7c6f8ef

View file

@ -934,6 +934,8 @@ void DivePlannerPointsModel::computeVariations()
struct diveplan plan_copy;
struct divedatapoint *last_segment;
if(!in_planner())
return;
cache_deco_state(&save);
cloneDiveplan(&plan_copy);
plan(&plan_copy, dive, 1, original, &cache, true, false);