X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=console.c;h=cd596418592a0b00fef50a234173c7b65a1bc8b5;hb=f129784b67308e149e458c9dfbdf245535ab2a8f;hp=034cac0c262cb83432dcb6d952d64ecd9da95bf1;hpb=0dfd3a30839fefb7c1d817618354350f4efd1131;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index 034cac0c..cd596418 100644 --- a/console.c +++ b/console.c @@ -524,14 +524,16 @@ Log_Close */ 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'; }