async_sink fixes

This commit is contained in:
gabime
2014-03-29 13:28:50 +03:00
parent 7cbf6dcbf7
commit 3a1ac8b4d6
2 changed files with 4 additions and 4 deletions

View File

@@ -68,8 +68,8 @@ inline c11log::sinks::async_sink::~async_sink()
}
inline void c11log::sinks::async_sink::_sink_it(const details::log_msg& msg)
{
auto msg_size = msg.msg_buf.second;
if(!msg_size)
auto msg_size = msg.msg_buf.second;
if(!_active || !msg_size)
return;
//re allocate on the heap the (stack based) message
auto new_msg = new details::log_msg();