diff options
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index b6fce75ca..fd6eee504 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -751,12 +751,11 @@ void DivePlannerPointsModel::tanksUpdated() void DivePlannerPointsModel::clear() { + Q_ASSERT(stagingDive == 0); if (mode == ADD) { stagingDive = current_dive; } else { - if (!stagingDive) - stagingDive = alloc_dive(); - memset(stagingDive->cylinder, 0, MAX_CYLINDERS * sizeof(cylinder_t)); + stagingDive = alloc_dive(); } CylindersModel::instance()->setDive(stagingDive); if (rowCount() > 0) { |