Index: gui_openlogdialog.c =================================================================== RCS file: /sources/xlog/xlog2/src/gui_openlogdialog.c,v retrieving revision 1.2 diff -u -r1.2 gui_openlogdialog.c --- gui_openlogdialog.c 27 Dec 2020 05:26:43 -0000 1.2 +++ gui_openlogdialog.c 8 Jan 2021 18:45:46 -0000 @@ -141,7 +141,6 @@ gtk_notebook_set_current_page (GTK_NOTEBOOK(mainnotebook), programstate.logwindows - 1); log_file_qso_foreach (lp, fillin_list, logwindow); - log_file_close (lp); g_free (logn); if (ro) logwindow->readonly = TRUE; lp->type = TYPE_FLOG; @@ -156,6 +155,7 @@ backuplog (sellog, xlogbackupfile); g_free (xlogbackupfile); } + log_file_close (lp); logwindow->filename = g_strdup (sellog); logwindowlist = g_list_append (logwindowlist, logwindow); set_qsoframe (logwindow);