*/
void Log_Close (void)
{
- if (logfile == NULL)
- return;
+ qfile_t* l = logfile;
- FS_Print (logfile, Log_Timestamp ("Log stopped"));
- FS_Print (logfile, "\n");
- FS_Close (logfile);
+ if (l == NULL)
+ return;
+ FS_Print (l, Log_Timestamp ("Log stopped"));
+ FS_Print (l, "\n");
logfile = NULL;
+ FS_Close (l);
+
crt_log_file[0] = '\0';
}