mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
CogEngine: Fix crash related to log and notification
This commit is contained in:
@@ -14,9 +14,9 @@ void FCogEngineWindow_Notifications::Initialize()
|
||||
{
|
||||
Super::Initialize();
|
||||
|
||||
OutputDevice.Notifications = this;
|
||||
|
||||
Config = GetConfig<UCogEngineConfig_Notifications>();
|
||||
|
||||
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; }
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user