Maybe fixed a rare locking issue.

This commit is contained in:
Leon Styhre 2023-01-28 13:36:22 +01:00
parent 295b93c852
commit 6b45cdb0f8

View file

@ -77,8 +77,8 @@ std::ostringstream& Log::get(LogLevel level)
Log::~Log() Log::~Log()
{ {
mOutStringStream << std::endl;
std::unique_lock<std::mutex> lock {sLogMutex}; std::unique_lock<std::mutex> lock {sLogMutex};
mOutStringStream << std::endl;
if (!sFile.is_open()) { if (!sFile.is_open()) {
// Not open yet, print to stdout. // Not open yet, print to stdout.