mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
planner: check nextdp for null
As correctly noted by Coverity, we check nextdp for null and later dereference it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
c91884223f
commit
2bbc95e8f1
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
|
|||
continue;
|
||||
|
||||
/* Store pointer to last entered datapoint for minimum gas calculation */
|
||||
if (dp->entered && !nextdp->entered)
|
||||
if (dp->entered && nextdp && !nextdp->entered)
|
||||
lastbottomdp = dp;
|
||||
|
||||
if (plan_verbatim) {
|
||||
|
|
Loading…
Reference in a new issue