Don't over-write log_fp if fp is NULL
authoraland <aland>
Fri, 7 Mar 2008 11:12:09 +0000 (11:12 +0000)
committeraland <aland>
Fri, 7 Mar 2008 11:12:09 +0000 (11:12 +0000)
src/main/log.c

index a57655d..6e4e3c9 100644 (file)
@@ -167,7 +167,7 @@ int vradlog(int lvl, const char *fmt, va_list ap)
                 *      we have no child threads.  If we do have child
                 *      threads, each thread has to open it's own FP.
                 */
-               if (can_update_log_fp) fr_log_fp = log_fp = fp;
+               if (can_update_log_fp && fp) fr_log_fp = log_fp = fp;
        }
 
        if (print_timestamp) {