aboutsummaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index 812eb5b5..c1aa876d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -330,6 +330,9 @@ void errorlog(char *fmt, ...) {
va_end(args);
/* also log to the error logfile, if opened */
+ if (!errorfile) {
+ return;
+ }
va_start(args, fmt);
vfprintf(errorfile, fmt, args);
fflush(errorfile);