Don't crash if we try to save a empty plan

Just treat it as a cancel instead.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-03-22 15:13:59 +01:00 committed by Dirk Hohndel
parent 8bc2ad1473
commit fc13361079

View file

@ -1468,6 +1468,9 @@ void DivePlannerPointsModel::createPlan()
char *cache = NULL;
tempDive = NULL;
if (!diveplan.dp)
return cancelPlan();
createTemporaryPlan();
plan(&diveplan, &cache, &tempDive, isPlanner());
copy_cylinders(stagingDive, tempDive);