diff --git a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp index 914d5a3..3710fff 100644 --- a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp +++ b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Notifications.cpp @@ -14,9 +14,9 @@ void FCogEngineWindow_Notifications::Initialize() { Super::Initialize(); - OutputDevice.Notifications = this; - Config = GetConfig(); + + OutputDevice.Notifications = this; } //-------------------------------------------------------------------------------------------------------------------------- @@ -46,6 +46,9 @@ void FCogEngineWindow_Notifications::AddNotification(const TCHAR* InMessage, ELo //-------------------------------------------------------------------------------------------------------------------------- void FCogEngineWindow_Notifications::OnLogReceived(const TCHAR* InMessage, ELogVerbosity::Type InVerbosity, const class FName& InCategory) { + if (Config == nullptr) + { return; } + if (Config->DisableNotifications) { return; } diff --git a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp index 76830a5..a2c6071 100644 --- a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp +++ b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_OutputLog.cpp @@ -51,7 +51,7 @@ void FCogEngineWindow_OutputLog::AddLog(const TCHAR* InMessage, ELogVerbosity::T FLogInfo& LogInfo = LogInfos.AddDefaulted_GetRef(); LogInfo.Frame = GFrameCounter; - LogInfo.Time = Config->UseUTCTime ? FDateTime::UtcNow() : FDateTime::Now(); + LogInfo.Time = Config != nullptr && Config->UseUTCTime ? FDateTime::UtcNow() : FDateTime::Now(); LogInfo.Verbosity = InVerbosity; LogInfo.Category = InCategory; LogInfo.LineStart = TextBuffer.size();