profile: mute a Coverity warning

CID 376698 was a false positive, but understandable.

It is very hard for Coverity to realize that current_dive
cannot be null if editedDive is not-null.

By replacing current_dive by originalDive, the alert
should go away, since the latter is not checked for null.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Berthold Stoeger 2022-03-13 20:31:36 +01:00 committed by Dirk Hohndel
parent 07313a015b
commit 32d042e73e

View file

@ -198,7 +198,7 @@ void ProfileWidget::plotCurrentDive()
setEnabledToolbar(current_dive != nullptr);
if (editedDive) {
setDive(current_dive);
setDive(originalDive);
view->plotDive(editedDive.get(), editedDc);
} else if (current_dive) {
setDive(current_dive);