From 4a6621892bc10d1e925d628ddd2ebd79cebe0466 Mon Sep 17 00:00:00 2001 From: yuxiaojun Date: Wed, 7 Dec 2022 16:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easylogger/plugins/file/elog_file.c | 3 +++ 1 file changed, 3 insertions(+) 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();