From 12c7c5ea961bcdc866dbf6ce121c428d43c3730b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 15 Nov 2019 20:16:02 +0100 Subject: Cleanup: move clearing of current_dive into clear_dive_file_data() It makes no sense to have a non-NULL current_dive once all dives have been deleted. Therefore, clear current_dive implicitly in clear_dive_file_data() and don't depend on the caller performing this. Signed-off-by: Berthold Stoeger --- desktop-widgets/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 416119b3b..632917733 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -658,7 +658,6 @@ void MainWindow::closeCurrentFile() /* free the dives and trips */ clear_git_id(); clear_dive_file_data(); - current_dive = nullptr; setCurrentFile(nullptr); graphics->setEmptyState(); mainTab->clearTabs(); -- cgit v1.2.3-70-g09d2