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
@ -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…
x
Reference in New Issue
Block a user