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>
Sun, 29 Sep 2013 15:08:27 +0000 (17:08 +0200)
citadel/event_client.h

index e123979278d1987ffb4ed36a3e9b11cb1aad4b24..cbb1a5cc18b8e2cd30477b07bf6971c07d822db9 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__)