diff --git a/src/details/file_helper.cpp b/src/details/file_helper.cpp index a28eccb4..b61eaf58 100644 --- a/src/details/file_helper.cpp +++ b/src/details/file_helper.cpp @@ -92,6 +92,7 @@ void file_helper::close() { } void file_helper::write(const memory_buf_t &buf) { + if(fd_ == nullptr) return; size_t msg_size = buf.size(); auto data = buf.data(); if (std::fwrite(data, 1, msg_size, fd_) != msg_size) {