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:
parent
cb867c0c2d
commit
7c9bd06ee4
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue