log/windows: Guard against null pointer dereference

This is semantically correct since we can't claim we own a console
before we find out if we have one or need to set one up.

Nobody should be calling using_own_console() before
early_log_file_setup() finishes, but you never know. People in this
project have surprised me before.
This commit is contained in:
Iris Morelle 2020-10-19 21:30:50 -03:00
parent cb867c0c2d
commit 7c9bd06ee4

View file

@ -484,7 +484,7 @@ void enable_native_console_output()
bool using_own_console()
{
return lfm->owns_console();
return lfm && lfm->owns_console();
}
void finish_log_file_setup()