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>
This commit is contained in:
Dirk Hohndel 2014-05-30 11:01:37 -07:00
parent 4dfe12e508
commit b36f8dd738

View file

@ -852,6 +852,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
void DivePlannerPointsModel::deleteTemporaryPlan() void DivePlannerPointsModel::deleteTemporaryPlan()
{ {
deleteTemporaryPlan(diveplan.dp); deleteTemporaryPlan(diveplan.dp);
diveplan.dp = NULL;
delete_single_dive(get_divenr(tempDive)); delete_single_dive(get_divenr(tempDive));
tempDive = NULL; tempDive = NULL;
} }