NULL-Protect the Context-ID
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 29 Sep 2013 15:08:27 +0000 (17:08 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 7 Oct 2013 19:35:22 +0000 (21:35 +0200)
citadel/event_client.h

index 99d4259f65b3c377bf9f1803102f82c28b13c72e..44b407d08f4dfc71b9ec272ad8418c8901652355 100644 (file)
@@ -223,7 +223,7 @@ extern int DebugCAres;
 
 #define EDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugEventLoop != 0))
 
-#define CCID ((CitContext*)IO->CitContext)->cs_pid
+#define CCID ((CitContext*)IO->CitContext)?((CitContext*)IO->CitContext)->cs_pid:-1
 
 #define EVQ_syslog(LEVEL, FORMAT, ...)                                 \
        EDBGLOG (LEVEL) syslog(LEVEL, "IOQ " FORMAT, __VA_ARGS__)