mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
8bc2ad1473
commit
fc13361079
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue