Merge pull request #7487 from Robyt3/Base-Assert-NoLogger-Fix

Fix `nullptr` access on `dbg_assert` with no global logger
This commit is contained in:
Dennis Felsing 2023-11-17 21:06:23 +00:00 committed by GitHub
commit 7d0718ee8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,9 @@ void log_set_global_logger(ILogger *logger)
void log_global_logger_finish() void log_global_logger_finish()
{ {
global_logger.load(std::memory_order_acquire)->GlobalFinish(); ILogger *logger = global_logger.load(std::memory_order_acquire);
if(logger)
logger->GlobalFinish();
} }
void log_set_global_logger_default() void log_set_global_logger_default()