mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Fix potential null pointer dereference
If createTemporaryPlan was called on a empty diveplan. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0812d2def2
commit
82b86fe924
1 changed files with 2 additions and 0 deletions
|
@ -1422,6 +1422,8 @@ void DivePlannerPointsModel::createTemporaryPlan()
|
|||
lastIndex = i;
|
||||
plan_add_segment(&diveplan, deltaT, p.depth, p.o2, p.he, p.po2);
|
||||
}
|
||||
if (!diveplan.dp)
|
||||
return;
|
||||
char *cache = NULL;
|
||||
tempDive = NULL;
|
||||
const char *errorString = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue