diff options
| author | Stefan Boberg <[email protected]> | 2026-03-17 15:49:40 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-03-17 15:49:40 +0100 |
| commit | 77cd25f357f10f2e1c71622c91032af87d9d1a7d (patch) | |
| tree | 5d206b058afec5020ff2082ec919413bf1d26d95 | |
| parent | 5.7.22 (diff) | |
| download | zen-77cd25f357f10f2e1c71622c91032af87d9d1a7d.tar.xz zen-77cd25f357f10f2e1c71622c91032af87d9d1a7d.zip | |
work around logging initialization issue in 5.7.22 (fixed differently on main)
| -rw-r--r-- | VERSION.txt | 2 | ||||
| -rw-r--r-- | src/zencore/logging.cpp | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/VERSION.txt b/VERSION.txt index 9c4a47d19..27097d80c 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.22
\ No newline at end of file +5.7.23-pre0
\ No newline at end of file diff --git a/src/zencore/logging.cpp b/src/zencore/logging.cpp index 099518637..624fc4866 100644 --- a/src/zencore/logging.cpp +++ b/src/zencore/logging.cpp @@ -419,25 +419,35 @@ namespace zen { bool LoggerRef::ShouldLog(logging::LogLevel Level) const { - return m_Logger->ShouldLog(Level); + return m_Logger && m_Logger->ShouldLog(Level); } void LoggerRef::SetLogLevel(logging::LogLevel NewLogLevel) { - m_Logger->SetLevel(NewLogLevel); + if (m_Logger) + { + m_Logger->SetLevel(NewLogLevel); + } } logging::LogLevel LoggerRef::GetLogLevel() { + if (!m_Logger) + { + return logging::Off; + } return m_Logger->GetLevel(); } void LoggerRef::Flush() { - m_Logger->Flush(); + if (m_Logger) + { + m_Logger->Flush(); + } } thread_local ScopedActivityBase* t_ScopeStack = nullptr; |