Core: use fallback session UUID if CreateUUID fails

Instead of a hard application failure, use a fallback UUID.
This commit is contained in:
Kawe Mazidjatari 2024-11-22 15:07:41 +01:00
parent a003e21f6e
commit 6ed6711426

View File

@ -60,6 +60,13 @@ void SpdLog_Init(const bool bAnsiColor)
#ifndef _TOOLS
g_LogSessionUUID = CreateUUID();
if (g_LogSessionUUID.empty())
{
// Fall-back directory in case of a failure.
g_LogSessionUUID = "00000000-0000-0000-0000-000000000000";
}
g_LogSessionDirectory = fmt::format("platform/logs/{:s}", g_LogSessionUUID);
/************************
* IMGUI LOGGER SETUP *