diff --git a/easylogger/plugins/file/elog_file.c b/easylogger/plugins/file/elog_file.c index efc3905..d05dfbb 100755 --- a/easylogger/plugins/file/elog_file.c +++ b/easylogger/plugins/file/elog_file.c @@ -113,6 +113,9 @@ void elog_file_write(const char *log, size_t size) ELOG_ASSERT(init_ok); ELOG_ASSERT(log); + if(fp == NULL) { + return; + } elog_file_port_lock();