aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-30 11:01:37 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-30 11:01:37 -0700
commitb36f8dd738963faae31312deca014c438e53e516 (patch)
treef6d111048251480e5ef890602e7a3f81f892196b /qt-ui
parent4dfe12e508d1abd9a65ce1cb1b32421da0132a05 (diff)
downloadsubsurface-b36f8dd738963faae31312deca014c438e53e516.tar.gz
Planner: after freeing the plan, throw away the pointer
Otherwise we'll happily go back and access the freed data structures later. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index bb00299b8..2b1662f7d 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -852,6 +852,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
void DivePlannerPointsModel::deleteTemporaryPlan()
{
deleteTemporaryPlan(diveplan.dp);
+ diveplan.dp = NULL;
delete_single_dive(get_divenr(tempDive));
tempDive = NULL;
}