Fix segvault if no config file was specified.

This commit is contained in:
Jordan Bancino 2022-11-01 09:47:25 -04:00
parent d9991bbd77
commit 757938b293

View file

@ -477,7 +477,7 @@ finish:
* If we're not logging to standard output, then we can close it. Otherwise,
* if we are logging to stdout, LogConfigFree() will close it for us.
*/
if (!(tConfig->flags & TELODENDRIA_LOG_STDOUT))
if (!tConfig || !(tConfig->flags & TELODENDRIA_LOG_STDOUT))
{
fclose(stdout);
}