From 03c6f4506ab06d2920c59b3c64f45cb4eec8c97a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 6 Dec 2023 14:46:18 +0000 Subject: internal: various improvements to avoid crashes on exit --- src/debug/Log.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/debug') diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index 659e2db4..d9a7f6aa 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -27,6 +27,7 @@ namespace Debug { inline int64_t* disableTime = nullptr; inline bool disableStdout = false; inline bool trace = false; + inline bool shuttingDown = false; inline std::string rollingLog = ""; // rolling log contains the ROLLING_LOG_SIZE tail of the log @@ -36,6 +37,9 @@ namespace Debug { if (level == TRACE && !trace) return; + if (shuttingDown) + return; + std::string logMsg = ""; switch (level) { -- cgit v1.2.3