mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(log): don't attempt to close log file if it failed to open on exit
This commit is contained in:
parent
17083b50ba
commit
fae9066be6
|
@ -75,8 +75,10 @@ void cleanup()
|
||||||
|
|
||||||
#ifdef LOG_TO_FILE
|
#ifdef LOG_TO_FILE
|
||||||
FILE* f = logFileFile.load();
|
FILE* f = logFileFile.load();
|
||||||
|
if (f != nullptr) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
logFileFile.store(nullptr); // atomically disable logging to file
|
logFileFile.store(nullptr); // atomically disable logging to file
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user