mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cb4daa85c3
commit
0a018f30de
1 changed files with 1 additions and 0 deletions
|
@ -1404,6 +1404,7 @@ void DivePlannerPointsModel::cancelPlan()
|
|||
free(stagingDive);
|
||||
setPlanMode(NOTHING);
|
||||
stagingDive = NULL;
|
||||
diveplan.dp = NULL;
|
||||
CylindersModel::instance()->setDive(current_dive);
|
||||
CylindersModel::instance()->update();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue