aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/logging.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/logging.h b/src/zencore/include/zencore/logging.h
index c40af1310..6a8fd7254 100644
--- a/src/zencore/include/zencore/logging.h
+++ b/src/zencore/include/zencore/logging.h
@@ -31,6 +31,10 @@ extern spdlog::logger* TheDefaultLogger;
inline spdlog::logger&
Log()
{
+ if (TheDefaultLogger == nullptr)
+ {
+ return zen::logging::ConsoleLog();
+ }
return *TheDefaultLogger;
}