summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-11-30 23:18:26 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-11-30 23:18:26 +0100
commitd09caa1b495ab49911a77ccdba9521a2633a2e04 (patch)
tree924a668aeffcac3e68c01d3510548692d63b5aaf /common
parentd8d51bd786e1a333c07a7d5ab125d4eb73c98b73 (diff)
downloadeurephia-d09caa1b495ab49911a77ccdba9521a2633a2e04.tar.gz
eurephia-d09caa1b495ab49911a77ccdba9521a2633a2e04.tar.xz
eurephia-d09caa1b495ab49911a77ccdba9521a2633a2e04.zip
BUGFIX: Avoid core dump on eurephia_log(...) if eurephiaCTX is NULL
Diffstat (limited to 'common')
-rw-r--r--common/eurephia_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/eurephia_log.c b/common/eurephia_log.c
index 08085e2..648e916 100644
--- a/common/eurephia_log.c
+++ b/common/eurephia_log.c
@@ -46,7 +46,7 @@ pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
void eurephia_log(eurephiaCTX *ctx, int logdst, int loglvl, const char *fmt, ... ) {
// Only log if we have an open log file and which has high enough log level
- if( (ctx->log != NULL) && (ctx->loglevel >= loglvl) ) {
+ if( (ctx != NULL) && (ctx->log != NULL) && (ctx->loglevel >= loglvl) ) {
va_list ap;
char tstmp_str[200];
time_t tstmp;