diff --git a/src/spdlog.cpp b/src/spdlog.cpp index 12ef5a30..cf9f961e 100644 --- a/src/spdlog.cpp +++ b/src/spdlog.cpp @@ -20,7 +20,7 @@ std::shared_ptr context() {return s_context;} const std::shared_ptr &context_ref() {return s_context;} -std::shared_ptr global_logger() { return context()->global_logger(); } +std::shared_ptr global_logger() { return context_ref()->global_logger(); } void set_global_logger(std::shared_ptr global_logger) { context()->set_logger(std::move(global_logger));