diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-04-18 10:21:58 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-18 10:21:58 -0700 |
commit | 0a018f30de5fccdc47e5f8c08d04e4c5efab8022 (patch) | |
tree | 288ba91e1ed5c6adbedaa6951028175deb97fc5b | |
parent | cb4daa85c37bd5fb88c660d19ed57148dcadece0 (diff) | |
download | subsurface-0a018f30de5fccdc47e5f8c08d04e4c5efab8022.tar.gz |
Fix crash when manually adding a dive
When a manually added dive is saved we cancel the plan. In that process
we throw away the cylinders which triggers a redraw of the profile. Which
tries to access the diveplan and its data points that have already been
freed. BOOM.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-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 4ca9a4938..2f55fd564 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1404,6 +1404,7 @@ void DivePlannerPointsModel::cancelPlan() free(stagingDive); setPlanMode(NOTHING); stagingDive = NULL; + diveplan.dp = NULL; CylindersModel::instance()->setDive(current_dive); CylindersModel::instance()->update(); } |