Skip to content

Commit

Permalink
Windows: Don't assume the log file was successfully opened
Browse files Browse the repository at this point in the history
  • Loading branch information
bylaws committed Sep 10, 2024
1 parent 360ea53 commit 0b0e15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Windows/Common/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static void MsgHandler(LogMan::DebugLevels Level, const char* Message) {
const auto Output = fextl::fmt::format("[{}][{:X}] {}\n", LogMan::DebugLevelStr(Level), GetCurrentThreadId(), Message);
if (WineDbgOut) {
WineDbgOut(Output.c_str());
} else {
} else if (LogFile) {
fwrite(Output.c_str(), 1, Output.size(), LogFile);
}
}
Expand All @@ -26,7 +26,7 @@ static void AssertHandler(const char* Message) {
const auto Output = fextl::fmt::format("[ASSERT] {}\n", Message);
if (WineDbgOut) {
WineDbgOut(Output.c_str());
} else {
} else if (LogFile) {
fwrite(Output.c_str(), 1, Output.size(), LogFile);
}
}
Expand Down

0 comments on commit 0b0e15c

Please sign in to comment.