diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-03-22 15:13:59 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-23 17:24:42 -0700 |
commit | fc1336107930b01d5280777037f1b30d4be09fee (patch) | |
tree | 4b646c1e989b4d5b38014d57bc581b61f8c2aa15 /qt-ui | |
parent | 8bc2ad14737eeb55368d19ab4d0b9735b7d35139 (diff) | |
download | subsurface-fc1336107930b01d5280777037f1b30d4be09fee.tar.gz |
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>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index da5bb53d6..ac2662c2b 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -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); |