diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h index 0e606518..4de48899 100644 --- a/include/spdlog/details/fmt_helper.h +++ b/include/spdlog/details/fmt_helper.h @@ -24,7 +24,10 @@ template inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer &dest) { auto *buf_ptr = view.data(); - dest.append(buf_ptr, buf_ptr + view.size()); + if(buf_ptr != nullptr) + { + dest.append(buf_ptr, buf_ptr + view.size()); + } } template