From 32d042e73e8a9d2e8fdc094bfb921a5e36516a9a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 13 Mar 2022 20:31:36 +0100 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- desktop-widgets/profilewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/profilewidget.cpp b/desktop-widgets/profilewidget.cpp index 6785ca8b5..e6fc9b098 100644 --- a/desktop-widgets/profilewidget.cpp +++ b/desktop-widgets/profilewidget.cpp @@ -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);