From 464aa664eb9300b85c752206065dc3542a8f4bd7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 13 Mar 2013 13:58:37 +0100 Subject: [PATCH] Allow session_log with session=NULL ptr --- src/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/session.c b/src/session.c index 50c4b94..65caa7c 100644 --- a/src/session.c +++ b/src/session.c @@ -2155,7 +2155,7 @@ void session_log(struct session *s, int level, const char *fmt, ...) va_start(ap, fmt); yaz_vsnprintf(buf, sizeof(buf)-30, fmt, ap); - yaz_log(level, "Session %u: %s", s->session_id, buf); + yaz_log(level, "Session %u: %s", s ? s->session_id : "-", buf); va_end(ap); } -- 1.7.10.4