diff options
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 8ebc67413..d2b208ed0 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -170,7 +170,10 @@ void MainWindow::on_actionClose_triggered() /* clear the selection and the statistics */ selected_dive = -1; - existing_filename = NULL; + if (existing_filename) { + free((void *)existing_filename); + existing_filename = NULL; + } cleanUpEmpty(); mark_divelist_changed(false); |