fix: do not write log if file handler is bad (#5675)
This commit is contained in:
parent
d2200cf9ea
commit
115a069d8d
|
@ -164,6 +164,11 @@ void logAddImpl(
|
||||||
if (fp == TR_BAD_SYS_FILE)
|
if (fp == TR_BAD_SYS_FILE)
|
||||||
{
|
{
|
||||||
fp = tr_sys_file_get_std(TR_STD_SYS_FILE_ERR);
|
fp = tr_sys_file_get_std(TR_STD_SYS_FILE_ERR);
|
||||||
|
// if fp is still bad, do not write log
|
||||||
|
if (fp == TR_BAD_SYS_FILE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto timestr = std::array<char, 64>{};
|
auto timestr = std::array<char, 64>{};
|
||||||
|
|
Loading…
Reference in New Issue