mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-01 04:05:38 +00:00
Log: Fix crash with >1 instance + file log
This commit is contained in:
parent
4bcc5a312a
commit
9fd2994b73
|
@ -427,9 +427,10 @@ void Log::SetFileOutputParams(bool enabled, const char* filename, bool timestamp
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
s_file_handle.reset(FileSystem::OpenCFile(filename, "wb"));
|
s_file_handle.reset(FileSystem::OpenCFile(filename, "wb"));
|
||||||
if (!s_file_handle)
|
if (!s_file_handle) [[unlikely]]
|
||||||
{
|
{
|
||||||
Log::Writef("Log", __FUNCTION__, LOGLEVEL_ERROR, "Failed to open log file '%s'", filename);
|
ExecuteCallbacks("Log", __FUNCTION__, LOGLEVEL_ERROR,
|
||||||
|
TinyString::from_format("Failed to open log file '{}'", filename), lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue