From a809816f70e4ed782386eb60bed97d6dc092d98c Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 14 Jan 2024 11:24:42 +0100 Subject: [PATCH] SpdLog: flush the tools logger Must manually kill the pointer on shutdown to flush it since this one is allocated by us and thus not managed by SpdLog. --- src/core/logdef.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/logdef.cpp b/src/core/logdef.cpp index 2adb7f44..b55303f1 100644 --- a/src/core/logdef.cpp +++ b/src/core/logdef.cpp @@ -110,4 +110,8 @@ void SpdLog_Init(const bool bAnsiColor) void SpdLog_Shutdown() { spdlog::shutdown(); +#ifdef _TOOLS + // Destroy the tools logger to flush it. + g_SuppementalToolsLogger.reset(); +#endif // !_TOOLS }