summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-05-24 21:12:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-05-24 21:12:15 +0200
commitb51dc590a1fc8aaa3b96ba4f686305e5e56a157b (patch)
tree637874ecb4d43020ab746511dec8965558d2478a
parente3ba3e8f66cf6d32a7408fe3e3666805ddf82578 (diff)
downloadfastd-b51dc590a1fc8aaa3b96ba4f686305e5e56a157b.tar
fastd-b51dc590a1fc8aaa3b96ba4f686305e5e56a157b.zip
Fix segfault on logging during config
-rw-r--r--src/printf.c2
1 files changed, 1 insertions, 1 deletions
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;