From b51dc590a1fc8aaa3b96ba4f686305e5e56a157b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 24 May 2012 21:12:15 +0200 Subject: Fix segfault on logging during config --- src/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/printf.c') diff --git a/src/printf.c b/src/printf.c index c5a8209..42d8720 100644 --- a/src/printf.c +++ b/src/printf.c @@ -192,7 +192,7 @@ void fastd_logf(const fastd_context *ctx, int level, const char *format, ...) { if (ctx->conf == NULL || level <= ctx->conf->log_stderr_level) fprintf(stderr, "%s%s%s\n", timestr, get_log_prefix(level), buffer); - if (level <= ctx->conf->log_syslog_level) + if (ctx->conf != NULL && level <= ctx->conf->log_syslog_level) syslog(level, "%s", buffer); fastd_log_fd *file; -- cgit v1.2.3