From 74dbf4cf702b49c98642c9afe74d114a238a6a07 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 10 May 2019 18:46:13 +0300 Subject: [PATCH] mutex protect should_color() --- include/spdlog/sinks/ansicolor_sink.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 905d270a..3fbbf27b 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -135,6 +135,7 @@ public: bool should_color() { + std::lock_guard lock(mutex_); return should_do_colors_; }