aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/divelist.c3
-rw-r--r--desktop-widgets/mainwindow.cpp1
-rw-r--r--mobile-widgets/qmlmanager.cpp1
3 files changed, 2 insertions, 3 deletions
diff --git a/core/divelist.c b/core/divelist.c
index 7c3201a3d..87151558a 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -1426,9 +1426,6 @@ void clear_dive_file_data()
clear_dive(&displayed_dive);
clear_dive_site(&displayed_dive_site);
- free((void *)existing_filename);
- existing_filename = NULL;
-
reset_min_datafile_version();
saved_git_id = "";
}
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 4aa4aa1b6..b13980c85 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -746,6 +746,7 @@ void MainWindow::closeCurrentFile()
/* free the dives and trips */
clear_git_id();
clear_dive_file_data();
+ setCurrentFile(NULL);
cleanUpEmpty();
mark_divelist_changed(false);
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 697d71dc8..296243f7e 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -602,6 +602,7 @@ void QMLManager::loadDivesWithValidCredentials()
appendTextToLog(errorString);
setNotificationText(errorString);
revertToNoCloudIfNeeded();
+ set_filename(NULL);
return;
}
consumeFinishedLoad(currentDiveTimestamp);