Check fd_ is not nullptr in file_helper

This commit is contained in:
gabime 2024-01-12 12:10:26 +02:00
parent 7cb90d1ab2
commit 2aa8b6c971

View File

@ -98,6 +98,7 @@ SPDLOG_INLINE void file_helper::close() {
}
SPDLOG_INLINE 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) {