Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit e933cb3

Browse files
fix #3
1 parent 2a739db commit e933cb3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

OFS-lib/OFS_FileLogging.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ static int LogThreadFunction(void* threadData) noexcept
4444
auto& thread = *(OFS_LogThread*)threadData;
4545
auto& msg = thread.LogMsgBuffer;
4646
auto waitMut = SDL_CreateMutex();
47-
47+
SDL_LockMutex(waitMut);
4848
while(!thread.ShouldExit && OFS_FileLogger::LogFileHandle) {
49-
SDL_LockMutex(waitMut);
5049
if(SDL_CondWait(thread.WaitFlush, waitMut) == 0) {
5150
SDL_AtomicLock(&thread.lock);
5251
SDL_RWwrite(OFS_FileLogger::LogFileHandle, msg.data(), 1, msg.size());

0 commit comments

Comments
 (0)