Commit a5a39c52 authored by gabime's avatar gabime

Added nullptr check to append_string_view

parent 6355e989
...@@ -24,7 +24,10 @@ template<size_t Buffer_Size> ...@@ -24,7 +24,10 @@ template<size_t Buffer_Size>
inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer<char, Buffer_Size> &dest) inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
{ {
auto *buf_ptr = view.data(); 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<typename T, size_t Buffer_Size> template<typename T, size_t Buffer_Size>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment