fix: Logs not being written to disk on Windows

This commit is contained in:
WerWolv 2023-05-20 13:10:35 +02:00
parent 969a37877a
commit 7ea7c531e2
1 changed files with 1 additions and 3 deletions

View File

@ -214,7 +214,7 @@ namespace hex {
#if defined(DEBUG) #if defined(DEBUG)
if (::GetLastError() == ERROR_INVALID_HANDLE) { if (::GetLastError() == ERROR_INVALID_HANDLE) {
result = AllocConsole(); result = AllocConsole() == TRUE;
} }
#endif #endif
@ -238,8 +238,6 @@ namespace hex {
} }
} }
} }
} else if (::GetLastError() == ERROR_INVALID_HANDLE) {
// The parent process is not a console process
} else { } else {
log::redirectToFile(); log::redirectToFile();
} }