diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-30 11:01:37 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-30 11:01:37 -0700 |
commit | b36f8dd738963faae31312deca014c438e53e516 (patch) | |
tree | f6d111048251480e5ef890602e7a3f81f892196b /qt-ui | |
parent | 4dfe12e508d1abd9a65ce1cb1b32421da0132a05 (diff) | |
download | subsurface-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.cpp | 1 |
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; } |