mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix nullptr
access on dbg_assert
with no global logger
Now it's also possible to use `dbg_assert` without/before having set a global logger.
This commit is contained in:
parent
4e27299657
commit
7d69016b3a
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue