summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 4ff6894e6..0209b2e1e 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1429,11 +1429,13 @@ void DivePlannerPointsModel::createTemporaryPlan()
cylinder_t *cyl = &stagingDive->cylinder[i];
if (cyl->depth.mm) {
dp = create_dp(0, cyl->depth.mm, cyl->gasmix.o2.permille, cyl->gasmix.he.permille, 0);
- if (diveplan.dp)
+ if (diveplan.dp) {
dp->next = diveplan.dp->next;
- else
+ diveplan.dp->next = dp;
+ } else {
dp->next = NULL;
- diveplan.dp->next = dp;
+ diveplan.dp = dp;
+ }
}
}
#if DEBUG_PLAN