summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/diveplannermodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index ee43468a7..6ff446a09 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -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);