Skip log in wincolor sink if out_handle_ is null

pull/1835/head
Gabi Melman 5 years ago
parent 5efccfa5e2
commit 95c19876c6

@ -58,7 +58,7 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::set_color(level::level_enum leve
template<typename ConsoleMutex>
void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::log(const details::log_msg &msg)
{
if (out_handle_ == INVALID_HANDLE_VALUE)
if (out_handle_ == nullptr || out_handle_ == INVALID_HANDLE_VALUE)
{
return;
}

Loading…
Cancel
Save